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

> ## Agent Instructions
> Base URL: https://api.social-api.ai/v1. Send your API key in the Authorization header: Authorization: Bearer <your API key>.
> Every error response from /v1 is JSON: { "error": { "code", "message", "meta" (optional) }, "request_id" }. Branch on error.code; use error.message only for logs.
> A 429 response carries a Retry-After header, in seconds, when the limit has a known wait.
> Paginated list endpoints return next_cursor, at the top level or inside pagination (see /guides/pagination). Pass it as the cursor query parameter to get the next page. An absent or empty next_cursor means you have the last page.
> Treat every ID as an opaque string: do not parse it or assume a format.
> Support differs by platform and by operation. Check /platforms/overview before assuming an operation works on a platform. An unsupported operation returns 501 with error.code resource.not_supported.

# Get a migration

> Returns your migration from a provider: the authorisation text to accept before starting, and once started, your accounts, the Brands and plan they need, and progress. If the provider cannot be read, the response is still 200 with `assessment` null and `assessment_error` set. The assessment can be up to 5 minutes old unless `refresh` is true. Dashboard sessions only; API keys get 403.



## OpenAPI

````yaml /api-reference/openapi.json get /migrations/{provider}
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /migrations/{provider}:
    get:
      tags:
        - Migration
      summary: Get a migration
      description: >-
        Returns your migration from a provider: the authorisation text to accept
        before starting, and once started, your accounts, the Brands and plan
        they need, and progress. If the provider cannot be read, the response is
        still 200 with `assessment` null and `assessment_error` set. The
        assessment can be up to 5 minutes old unless `refresh` is true.
        Dashboard sessions only; API keys get 403.
      parameters:
        - description: Provider identifier
          name: provider
          in: path
          required: true
          schema:
            type: string
        - description: true to read your accounts now
          name: refresh
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.MigrationResponse'
        '400':
          description: Unknown provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '403':
          description: >-
            Dashboard session required, or the feature is not available on your
            account yet (`auth.beta_only`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.MigrationResponse:
      type: object
      properties:
        assessed_at:
          description: >-
            When the accounts were last read, RFC 3339. Null until the first
            read succeeds.
          type: string
        assessment:
          description: >-
            Your accounts and how they map to SocialAPI. Null until started, or
            when your provider could not be read.
          allOf:
            - $ref: '#/components/schemas/api_endpoints.MigrationAssessment'
        assessment_error:
          description: >-
            Why `assessment` is null on a started migration:
            `migration.key_invalid`, `migration.key_restricted` or
            `migration.source_unavailable`.
          type: string
        authorisation:
          description: Text to accept before starting, and its version.
          allOf:
            - $ref: '#/components/schemas/api_endpoints.MigrationAuthorisation'
        authorisation_version:
          description: Version of the authorisation text accepted. Null until started.
          type: string
        authorised_at:
          description: When the authorisation was accepted, RFC 3339. Null until started.
          type: string
        base_url:
          description: Base URL to set in your existing client. Null until started.
          type: string
          example: https://z.social-api.ai/api
        created_at:
          description: When the migration started, RFC 3339. Null until started.
          type: string
        cut_over:
          description: Accounts already reconnected to SocialAPI.
          type: integer
        forwarded_calls:
          description: Requests sent through the base URL since the migration started.
          type: integer
        key_hint:
          description: Start and end of the key in use. Null until started.
          type: string
        started:
          description: True once a migration has started.
          type: boolean
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    api_endpoints.MigrationAssessment:
      type: object
      properties:
        brands:
          description: Brands needed across all profiles.
          type: integer
        pages_per_brand:
          description: Most Pages any one Brand needs on a single platform.
          type: integer
        profiles:
          description: One entry per profile at your provider.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MigrationProfile'
        recommended_plan:
          description: Cheapest plan that fits.
          allOf:
            - $ref: '#/components/schemas/api_endpoints.MigrationPlan'
        servable_accounts:
          description: Accounts SocialAPI can serve.
          type: integer
        stays_with_provider:
          description: Accounts that stay with your provider, by platform.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MigrationUnsupported'
    api_endpoints.MigrationAuthorisation:
      type: object
      properties:
        text:
          type: string
        version:
          type: string
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
    api_endpoints.MigrationProfile:
      type: object
      properties:
        brands:
          type: integer
        id:
          type: string
        name:
          type: string
        pages_per_brand:
          type: integer
        servable_accounts:
          type: integer
        splits:
          description: Why the profile needs more than one Brand, one line per reason.
          type: array
          items:
            type: string
    api_endpoints.MigrationPlan:
      type: object
      properties:
        brands_limit:
          type: integer
        name:
          type: string
        pages_per_brand:
          type: integer
        tier:
          type: string
          example: starter
    api_endpoints.MigrationUnsupported:
      type: object
      properties:
        count:
          type: integer
        platform:
          description: Platform name as your provider reports it.
          type: string
        reason:
          description: >-
            Why the accounts stay: "unserved platform", "ads", "telephony",
            "commerce", "unknown platform" or "linked to another account".
          type: string
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.