> ## Documentation Index
> Fetch the complete documentation index at: https://www.getsoundlink.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a self-serve soundlink

> Creates a self-serve soundlink in the organization. This is the Public
API equivalent of the in-app create flow. It does not create a wallet
campaign and does not appear on `GET /v1/campaigns`.

Requires the `soundlinks:write` scope.

`Idempotency-Key` is **required**. Reusing the key with an unchanged
body replays the original `201`; a different body returns
`409 idempotency_key_conflict`. Keys are honored for 24 hours.

**Auth:** Accepts API key or OAuth Bearer (`soundlinks:write`).




## OpenAPI

````yaml /openapi/soundlink-public-api-v1.yaml post /v1/soundlinks
openapi: 3.0.3
info:
  title: Soundlink Public API
  version: 0.0.1-draft
  description: >
    Campaign listing, metrics, and write operations for Soundlink partner
    organizations.


    **Base URL:** `https://api.getsoundlink.com`


    ## Authentication


    Send `Authorization: Bearer` with one of:


    1. **API key (recommended)** — a `sk_*` key from the Soundlink app
       (Settings → Developer → API keys):
       ```
       Authorization: Bearer sk_abc123_<token>
       ```

    2. **OAuth Bearer** — an access token from Sign in with Soundlink
       (authorization code or client credentials). Token scopes use the
       same strings as Public API key scopes (for example `campaigns:read`,
       `metrics:read`):
       ```
       Authorization: Bearer <oauth_access_token>
       ```

    `x-api-key` is no longer accepted and is ignored if sent. Requests

    without `Authorization: Bearer` return `401 invalid_api_key` (or

    `401 invalid_token` when a Bearer value is present but neither a

    recognized `sk_*` key nor a valid OAuth access token).


    ### Which operations accept OAuth?


    | Operations | Required scope | Auth |

    | --- | --- | --- |

    | `GET /v1/ping` | any granted Public API scope | API key (Bearer) or OAuth
    Bearer |

    | Campaign reads (`GET /v1/strategies`, `GET /v1/campaigns`, campaign
    detail, tiers) | `campaigns:read` | API key (Bearer) or OAuth Bearer |

    | Metrics reads (overview, breakdown, exports) | `metrics:read` | API key
    (Bearer) or OAuth Bearer |

    | Campaign writes (create, stop, budget, tier updates) | `campaigns:write` |
    API key (Bearer) or OAuth Bearer |

    | Video import / import status | `videos:write` | API key (Bearer) or OAuth
    Bearer |

    | Soundlink reads (list, detail, metrics overview/breakdown/engagement,
    JSONL exports) | `soundlinks:read` | API key (Bearer) or OAuth Bearer |

    | Soundlink writes (create, archive) | `soundlinks:write` | API key (Bearer)
    or OAuth Bearer |


    Per-operation scope requirements are also marked with `x-required-scope`

    (except `GET /v1/ping`, which accepts any valid credential with at least

    one Public API scope granted to the key/token).


    All responses are wrapped in a standard envelope:

    ```json

    { "data": <payload>, "meta": { "requestId": "<uuid>" } }

    ```


    Errors follow the same envelope shape with an `error` field instead of
    `data`.
servers:
  - url: https://api.getsoundlink.com
    description: Production
security:
  - apiKeyBearerAuth: []
  - oauthBearer: []
tags:
  - name: System
    description: Connectivity and auth verification
  - name: Campaigns
    description: >-
      Campaign listing, detail, creation, and wallet management (budget, stop,
      tiers)
  - name: Metrics
    description: Campaign performance metrics
  - name: Videos
    description: Partner video library import for Full Control campaigns
  - name: Soundlinks
    description: Soundlink listing, detail, creation, archive, and performance metrics
paths:
  /v1/soundlinks:
    post:
      tags:
        - Soundlinks
      summary: Create a self-serve soundlink
      description: |
        Creates a self-serve soundlink in the organization. This is the Public
        API equivalent of the in-app create flow. It does not create a wallet
        campaign and does not appear on `GET /v1/campaigns`.

        Requires the `soundlinks:write` scope.

        `Idempotency-Key` is **required**. Reusing the key with an unchanged
        body replays the original `201`; a different body returns
        `409 idempotency_key_conflict`. Keys are honored for 24 hours.

        **Auth:** Accepts API key or OAuth Bearer (`soundlinks:write`).
      operationId: createSoundlink
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSoundlinkRequest'
            examples:
              track:
                summary: Track soundlink
                value:
                  name: Midnight Drive
                  spotifyUrl: https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl
                  autoFollow: true
                  artistIdFollow: 4gzpq5DPGxSnKTe4SA8HAU
                  metaPixelId: '1234567890123456'
                  metaConversionAccessToken: EAAB...
              playlist:
                summary: Playlist soundlink
                value:
                  name: Late Night Mix
                  spotifyUrl: https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M
      responses:
        '201':
          description: Soundlink created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoundlinkDetailResponse'
              example:
                data:
                  soundlinkId: V1StGXR8_Z5jdHi6B-myT
                  organizationId: a7ac3173-2f71-4e79-921f-d15d7112dd11
                  name: Midnight Drive
                  url: https://sndl.ink/soundlink/V1StGXR8_Z5jdHi6B-myT
                  targetType: track
                  spotifyUrl: https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl
                  status: active
                  createdAt: '2026-04-01T10:00:00Z'
                  autoFollow: true
                  artistIdFollow: 4gzpq5DPGxSnKTe4SA8HAU
                  metaPixelId: '1234567890123456'
                  tiktokPixelId: null
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
        '400':
          $ref: '#/components/responses/CreateSoundlinkBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/CreateSoundlinkForbidden'
        '409':
          $ref: '#/components/responses/IdempotencyKeyConflict'
        '422':
          $ref: '#/components/responses/CreateSoundlinkUnprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - apiKeyBearerAuth: []
        - oauthBearer: []
components:
  parameters:
    idempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 255
      description: >
        A unique string identifying this request, used to safely retry write

        operations (campaign create/stop/budget, soundlink create) without
        repeating

        side effects. Required on every request that references this parameter.

        Reusing this key with an unchanged request body replays the original

        response; reusing it with a different body returns

        `409 idempotency_key_conflict`. Keys are honored for 24 hours.
  schemas:
    CreateSoundlinkRequest:
      type: object
      required:
        - name
        - spotifyUrl
      properties:
        name:
          type: string
          minLength: 1
          description: Human-readable soundlink name.
        spotifyUrl:
          type: string
          format: uri
          description: |
            HTTPS Spotify track or playlist URL. Album, artist, and URI
            (`spotify:track:...`) forms are rejected. An optional `intl-xx`
            path segment is accepted. Query strings are stripped before
            lookup. The resource must currently exist on Spotify.
          example: https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl
        autoFollow:
          type: boolean
          default: false
          description: |
            When true, fans who connect Spotify from the landing page are
            asked to follow the track artist (`artistIdFollow`, or the
            track's primary artist when omitted), or the playlist itself
            when `spotifyUrl` is a playlist. Defaults to false.
        artistIdFollow:
          type: string
          description: |
            Spotify artist ID used for auto-follow on track links.
            Optional. Persisted even when `autoFollow` is false. For
            multi-artist tracks, pass the artist that should be followed.
            Ignored when `spotifyUrl` is a playlist.
        metaPixelId:
          type: string
          description: |
            Meta pixel ID. Must be sent together with
            `metaConversionAccessToken`. Omit both to skip Meta tracking.
        metaConversionAccessToken:
          type: string
          writeOnly: true
          description: |
            Meta Conversions API access token. Write-only: accepted on create,
            never returned on GET. Must be sent together with `metaPixelId`.
    SoundlinkDetailResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          $ref: '#/components/schemas/SoundlinkDetail'
        meta:
          $ref: '#/components/schemas/Meta'
    SoundlinkDetail:
      allOf:
        - $ref: '#/components/schemas/SoundlinkSummary'
        - type: object
          required:
            - autoFollow
            - artistIdFollow
            - metaPixelId
            - tiktokPixelId
          properties:
            autoFollow:
              type: boolean
              description: Whether auto-follow is enabled on this soundlink.
            artistIdFollow:
              type: string
              nullable: true
              description: |
                Spotify artist ID configured for auto-follow on track links.
                Unused for playlists. `null` if not set.
            metaPixelId:
              type: string
              nullable: true
              description: Meta pixel ID configured on this soundlink. `null` if not set.
            tiktokPixelId:
              type: string
              nullable: true
              description: TikTok pixel ID configured on this soundlink. `null` if not set.
    Meta:
      type: object
      required:
        - requestId
      properties:
        requestId:
          type: string
          format: uuid
          description: Server-generated request ID. Include when contacting support.
    ErrorResponse:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    SoundlinkSummary:
      type: object
      required:
        - soundlinkId
        - organizationId
        - name
        - url
        - targetType
        - status
        - createdAt
      properties:
        soundlinkId:
          type: string
          description: |
            Unique ID of this soundlink (URL-safe string, same ID used in the
            public sndl.ink URL).
          example: V1StGXR8_Z5jdHi6B-myT
        organizationId:
          type: string
          description: Soundlink organization ID (UUID).
        name:
          type: string
          description: Human-readable soundlink name.
        url:
          type: string
          format: uri
          description: Public soundlink landing page URL.
          example: https://sndl.ink/soundlink/V1StGXR8_Z5jdHi6B-myT
        targetType:
          type: string
          nullable: true
          enum:
            - track
            - album
            - playlist
          description: |
            Type of Spotify resource this soundlink promotes. `null` if the
            target could not be determined.
        spotifyUrl:
          type: string
          format: uri
          nullable: true
          description: Spotify URL of the promoted resource.
        status:
          $ref: '#/components/schemas/SoundlinkStatus'
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable snake_case error code.
          enum:
            - invalid_api_key
            - api_key_revoked
            - api_key_expired
            - insufficient_scope
            - not_found
            - campaign_not_found
            - invalid_query_parameter
            - invalid_date_range
            - page_size_exceeded
            - invalid_request
            - invalid_genre
            - invalid_duration_or_budget
            - invalid_daily_budget
            - invalid_duration_days
            - invalid_spotify_url
            - invalid_tier_budget_allocation
            - invalid_tier_status
            - tier_update_cooldown
            - wallet_not_enabled
            - insufficient_credit
            - idempotency_key_conflict
            - rate_limit_exceeded
            - invalid_video_url
            - video_import_limit_exceeded
            - video_import_session_not_found
            - internal_error
        message:
          type: string
          description: Human-readable error description. Do not parse programmatically.
        details:
          type: object
          nullable: true
          description: |
            Additive, error-code-specific context (e.g. `available`/`required`
            on `insufficient_credit`). Absent or `null` for error codes that
            carry no extra data.
          additionalProperties: true
    SoundlinkStatus:
      type: string
      enum:
        - draft
        - active
        - archived
  responses:
    CreateSoundlinkBadRequest:
      description: |
        Missing or malformed request body, or a missing/empty
        `Idempotency-Key` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_field:
              value:
                error:
                  code: invalid_request
                  message: 'Missing required field: name.'
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
            missing_idempotency_key:
              value:
                error:
                  code: invalid_request
                  message: Idempotency-Key header is required and must not be empty.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
            pixel_pair:
              value:
                error:
                  code: invalid_request
                  message: >-
                    metaPixelId and metaConversionAccessToken must both be
                    provided, or both omitted.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: |
        Missing or invalid credentials. Covers missing/malformed API keys,
        invalid or expired OAuth access tokens, and revoked API keys.
        `x-api-key` is not accepted and is ignored if sent.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Present only on `rate_limit_exceeded`
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_api_key:
              value:
                error:
                  code: invalid_api_key
                  message: 'Missing credentials. Send Authorization: Bearer.'
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
            invalid_token:
              value:
                error:
                  code: invalid_token
                  message: OAuth access token is invalid or expired.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
            api_key_revoked:
              value:
                error:
                  code: api_key_revoked
                  message: >-
                    This API key has been revoked. Create a new key in Settings
                    → Developer → API keys.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
    CreateSoundlinkForbidden:
      description: |
        Valid credentials but missing the `soundlinks:write` scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficient_scope:
              value:
                error:
                  code: insufficient_scope
                  message: This key does not have the soundlinks:write scope.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
    IdempotencyKeyConflict:
      description: |
        The `Idempotency-Key` was reused with a materially different request
        body, or a request with the same key is still in progress.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            conflicting_body:
              value:
                error:
                  code: idempotency_key_conflict
                  message: >-
                    This Idempotency-Key was already used with a different
                    request body.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
            in_progress:
              value:
                error:
                  code: idempotency_key_conflict
                  message: >-
                    A request with this Idempotency-Key is still processing.
                    Retry after a short delay.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
    CreateSoundlinkUnprocessable:
      description: Request body is well-formed but the Spotify URL is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_spotify_url:
              summary: >-
                Malformed URL, unsupported type, or Spotify resource does not
                exist
              value:
                error:
                  code: invalid_spotify_url
                  message: Spotify track not found.
                meta:
                  requestId: 550e8400-e29b-41d4-a716-446655440000
    RateLimited:
      description: Per-key rate limit exceeded (60/min, 600/hr)
      headers:
        Retry-After:
          required: true
          schema:
            type: integer
          description: Seconds until the rate limit resets
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: >-
                Rate limit exceeded. Retry after the number of seconds indicated
                in the Retry-After header.
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: >-
                An unexpected error occurred. Contact support with the
                requestId.
            meta:
              requestId: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    apiKeyBearerAuth:
      type: http
      scheme: bearer
      description: |
        Pass your Soundlink `sk_*` API key as a Bearer token:
        `Authorization: Bearer sk_<prefix>_<token>` (not an OAuth token; see
        `oauthBearer` for that). Accepted on all Public API operations. Send
        only one `Authorization` header per request.
    oauthBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        OAuth 2.0 access token from Sign in with Soundlink
        (`Authorization: Bearer <oauth_access_token>`).
        Token scopes must include the operation's required scope
        (see `x-required-scope` and the Authentication section).
        Accepted on all Public API operations (reads and writes).

````