Skip to content
Linq Copy agent prompt

Create a SIP profile

client.SipProfiles.New(ctx, body) (*SipProfile, error)
POST/v3/sip-profiles

SIP configuration

Your Linq representative provides the signaling and media IP ranges and ports to allow through your firewall during onboarding.

Set primary_uri to your endpoint as scheme + host — sips: for TLS or sip: for UDP, with no user part (we add it). Each call arrives at your endpoint as:

sip:<called-number>@<your-host>

so you can route on the dialed number. The caller’s number is in the From header in E.164.


Create a SIP routing profile for your inbound calls, then assign it to a phone number to start routing calls to its SIP URI.

ParametersExpand Collapse
body SipProfileNewParams
Name param.Field[string]
maxLength64
PrimaryUri param.Field[string]

Your SIP endpoint as scheme + host, e.g. sips:sip.partner.example. Must start with sip: (UDP) or sips: (TLS) — the scheme sets the transport. Do not include a user part: we set it to the called number on each call (sip:<called-number>@<your-host>). A bare host with no scheme is rejected.

maxLength512
BackupUri param.Field[string]Optional

Optional failover SIP URI

maxLength512
ReturnsExpand Collapse
type SipProfile struct{…}
ID string

Unique identifier for the SIP profile

AssignedNumberCount int64

How many phone numbers reference this profile

CreatedAt Time
formatdate-time
Name string

Human-readable name

PrimaryUri string

Your SIP endpoint as scheme + host (sip: UDP / sips: TLS); no user part — we set it to the called number on each call.

UpdatedAt Time
formatdate-time
Version int64

Monotonic version, incremented on each update

BackupUri stringOptional

Optional failover SIP URI. Null when unset.

Create a SIP profile

package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sipProfile, err := client.SipProfiles.New(context.TODO(), linqgo.SipProfileNewParams{
    Name: "byoc-primary",
    PrimaryUri: "sips:sip.partner.example",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sipProfile.ID)
}
{
  "id": "sip_8a3f9c2b1d4e4f5a9b8c7d6e5f4a3b2c",
  "assigned_number_count": 0,
  "created_at": "2026-10-29T10:30:00Z",
  "name": "byoc-primary",
  "primary_uri": "sips:sip.partner.example",
  "updated_at": "2026-10-29T10:30:00Z",
  "version": 1,
  "backup_uri": null
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 409,
    "code": 2013,
    "message": "This chat is unavailable",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2013/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
  },
  "success": false
}
Returns Examples
{
  "id": "sip_8a3f9c2b1d4e4f5a9b8c7d6e5f4a3b2c",
  "assigned_number_count": 0,
  "created_at": "2026-10-29T10:30:00Z",
  "name": "byoc-primary",
  "primary_uri": "sips:sip.partner.example",
  "updated_at": "2026-10-29T10:30:00Z",
  "version": 1,
  "backup_uri": null
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 409,
    "code": 2013,
    "message": "This chat is unavailable",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2013/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
  },
  "success": false
}