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

# Assign a number

> Assigns a phone number to an organisation and the destination it rings to (an extension, queue, IVR flow, process, or an external number). The number is normalised to E.164 in the organisation's default region or refused; a destination_id is checked against the organisation so a number cannot be pointed at another tenant's resource. Requires routing:write. 409 if the number already belongs to an organisation.



## OpenAPI

````yaml /api-reference/openapi-public.json post /dids
openapi: 3.0.3
info:
  description: >-
    The API your own systems use: place and follow calls, have an AI agent call
    someone, run campaigns and get their results, keep contacts in step with
    your CRM, and receive signed webhooks. Authenticate with an integration key
    (Authorization: Bearer ft_...), used only from the IP addresses it allows.
  title: FireTone API
  version: 0.1.0
servers:
  - description: Your platform's API host
    url: https://{host}/api/v1
    variables:
      host:
        default: api.firet.one
security:
  - bearerAuth: []
tags:
  - name: Auth
  - description: >-
      Live calls and what can be done to them: hang up, hold, transfer, park,
      merge, monitor, whisper; the Desk's own call.
    name: Calls
  - description: 'Outbound campaigns: contacts, attempts, outcomes.'
    name: Campaigns
  - description: 'Customers: who called, what is known about them, and their memory.'
    name: Contacts
  - description: What was said on an AI call, and the review of it.
    name: Conversations
  - name: IVR
  - description: >-
      Your own systems: HTTP connections an IVR calls mid-call, and webhooks for
      call events. Tenant URLs must be public https addresses.
    name: Integrations
  - name: Live
  - name: Provisioning
  - name: Reporting
  - description: Tickets raised by people, agents and the API.
    name: Tickets
  - description: Messages left for an extension or a queue.
    name: Voicemail
paths:
  /dids:
    post:
      tags:
        - Provisioning
      summary: Assign a number
      description: >-
        Assigns a phone number to an organisation and the destination it rings
        to (an extension, queue, IVR flow, process, or an external number). The
        number is normalised to E.164 in the organisation's default region or
        refused; a destination_id is checked against the organisation so a
        number cannot be pointed at another tenant's resource. Requires
        routing:write. 409 if the number already belongs to an organisation.
      operationId: postDids
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDIDRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DID'
          description: Created
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: That number already belongs to an organisation
components:
  schemas:
    CreateDIDRequest:
      properties:
        destination_id:
          description: >-
            The id of the extension, queue, IVR flow, process, room or client
            trunk the number goes to. Must belong to the number's organisation.
            Not used for `external`.
          format: uuid
          type: string
        destination_type:
          description: >-
            Where the number's calls go: `extension` (a phone), `queue`, `flow`
            (an IVR), `process`, `conference` (a room), `external` (forwarded to
            another number), `client_trunk` (a client's own PBX; only where that
            module is on) or `recorder`.
          enum:
            - extension
            - queue
            - external
            - flow
            - process
            - recorder
            - conference
            - client_trunk
          type: string
        destination_value:
          description: >-
            For `external`: the number to forward to, normalised to E.164. For
            `extension`: the extension number, as an alternative to
            `destination_id`.
          type: string
        e164:
          description: >-
            International with a leading + (or 00), or national in the
            organisation's default_region. Stored and returned in E.164;
            anything that is not a possible international number, or a valid
            national one, is refused with 400.
          example: '+61300009999'
          type: string
        organisation_id:
          description: >-
            The organisation the number belongs to. May be left out by a caller
            with exactly one organisation.
          format: uuid
          type: string
        team_id:
          description: >-
            The team the number belongs to, if any; a team supervisor sees only
            their teams' numbers.
          format: uuid
          type: string
      required:
        - e164
        - destination_type
      type: object
    DID:
      properties:
        destination_id:
          description: >-
            The id of the extension, queue, IVR flow, process, room or client
            trunk the number goes to. Must belong to the number's organisation.
            Not used for `external`.
          format: uuid
          nullable: true
          type: string
        destination_type:
          description: >-
            Where the number's calls go: `extension` (a phone), `queue`, `flow`
            (an IVR), `process`, `conference` (a room), `external` (forwarded to
            another number), `client_trunk` (a client's own PBX; only where that
            module is on) or `recorder`.
          enum:
            - extension
            - queue
            - external
            - flow
            - process
            - recorder
            - conference
            - client_trunk
          type: string
        destination_value:
          description: >-
            For `external`: the number to forward to, normalised to E.164. For
            `extension`: the extension number, as an alternative to
            `destination_id`.
          nullable: true
          type: string
        e164:
          description: The number, in E.164 form with the plus.
          example: '+61300000001'
          type: string
        enabled:
          description: >-
            Whether the number is in service. A disabled number's calls are
            refused.
          type: boolean
        id:
          description: The number's id.
          format: uuid
          type: string
        monthly_rental:
          description: >-
            Exact decimal amount as a string. Never a JSON number: rates are
            fractions of a cent and binary floating point cannot represent them
            exactly.
          example: '12.5000'
          type: string
        organisation_id:
          description: >-
            The organisation the number belongs to. May be left out by a caller
            with exactly one organisation.
          format: uuid
          type: string
        team_id:
          description: >-
            The team the number belongs to, if any; a team supervisor sees only
            their teams' numbers.
          format: uuid
          nullable: true
          type: string
        trunk_id:
          description: The trunk this number arrives on, when it is pinned to one.
          format: uuid
          type: string
      required:
        - id
        - organisation_id
        - e164
        - destination_type
        - enabled
      type: object
    Error:
      properties:
        error:
          properties:
            code:
              enum:
                - invalid_request
                - invalid_credentials
                - unauthenticated
                - forbidden
                - not_found
                - conflict
                - internal
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or API key
      description: >-
        Every request sends `Authorization: Bearer <token>`. The token is either
        a panel session (a JWT from /auth/login, 12 hours) or an API key
        `ft_<id>_<secret>`. An API key is accepted only from an address on its
        IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required
        for an old key that has none), is limited to its rate per minute (429
        rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on
        every response), and at most 60 call placements a minute.
      scheme: bearer
      type: http

````

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