> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.telekesher.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.telekesher.dev/_mcp/server.

# Originate outbound call

POST https://api.telekesher.dev/v1/sessions:dial
Content-Type: application/json

Originate a new outbound call. Returns immediately with the new
`session_uuid`; call progress is delivered via webhooks.

**Triggered webhooks:** `command.session.dial.accepted`, `session.ringing_started`,
`session.early_media_started` (optional, NOT an answer), `session.answered`, `session.ended`

Reference: https://docs.telekesher.dev/api/sessions/dial

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: voice-api
  version: 1.0.0
paths:
  /v1/sessions:dial:
    post:
      operationId: createDial
      summary: Originate outbound call
      description: >-
        Originate a new outbound call. Returns immediately with the new

        `session_uuid`; call progress is delivered via webhooks.


        **Triggered webhooks:** `command.session.dial.accepted`,
        `session.ringing_started`,

        `session.early_media_started` (optional, NOT an answer),
        `session.answered`, `session.ended`
      tags:
        - callControl
      parameters:
        - name: Authorization
          in: header
          description: >-
            Application auth. Send `Authorization: Bearer <app_uuid>:<api_key>`.
            See
            [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication)
            for details.
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            Optional client-generated key for a mutating endpoint. It identifies
            one method, route, query, content type, and exact raw body within
            the authenticated app. Reusing it for a different request returns
            422. While its record exists, a retry replays the original accepted
            response when available. Keys are valid for 1 hour. Allowed
            characters: letters, digits, dot, hyphen, underscore; max 128
            characters. See the Idempotency guide.
          required: false
          schema:
            type: string
      responses:
        '202':
          description: Dial accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Call Control_createDial_Response_202'
        '400':
          description: |-
            Missing `Authorization`, malformed Bearer credentials, or an
            invalid request body. Body errors include missing `to`/`from`, a
            malformed number, or `ring_timeout_sec` / `max_duration_sec` out
            of range. Phone-format errors begin with `invalid_to:` or
            `invalid_from:` and require canonical E.164 with a leading `+`.
            A syntactically valid credential with an invalid API key
            returns `401` instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestBadRequestError'
        '401':
          description: >-
            The Bearer credential is syntactically valid but its API key is
            invalid. Missing `Authorization` or malformed Bearer credentials
            return `400`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestUnauthorizedError'
        '403':
          description: >-
            `from` is supported but not on this app's caller-ID allow-list. No
            call is placed.

            The stable machine-readable response code is `forbidden`; do not
            branch on the human message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestForbiddenError'
        '409':
          description: >-
            A request with this `Idempotency-Key` is already in progress. Wait
            for its result instead of re-sending. See the Idempotency guide.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestConflictError'
        '413':
          description: Request body exceeds the endpoint's size limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestContentTooLargeError'
        '415':
          description: >-
            A request with a JSON body must use `Content-Type:
            application/json`.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateDialRequestUnsupportedMediaTypeError
        '422':
          description: >-
            The `Idempotency-Key` was reused with a different request body. A
            key maps to one request; use a new key. See the Idempotency guide.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestUnprocessableEntityError'
        '500':
          description: Internal gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestInternalServerError'
        '503':
          description: |-
            The idempotency store is unavailable so the request was not
            processed — retry with the same `Idempotency-Key`. (Outbound
            capacity exhaustion is reported as `529`, not `503`.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDialRequestServiceUnavailableError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: >-
                    Caller ID to present, in the same E.164 format with leading
                    `+` as `to` (e.g. `+972527121102`).

                    The schema validates canonical syntax only. Runtime country
                    policy must support

                    the number, and it must be on the app's caller-ID
                    allow-list. A supported but

                    non-allow-listed value is rejected with `403 forbidden` (no
                    call is placed,

                    no webhooks fire). Branch on the response `code`, not the
                    human message.

                    The gateway does not substitute a default caller ID; an SDK
                    MAY catch

                    `403 forbidden` for this operation and retry with its own
                    configured approved default.
                max_duration_sec:
                  type: integer
                  description: >-
                    Maximum total call duration in seconds. A typical value is
                    3600.
                ring_timeout_sec:
                  type: integer
                  description: >-
                    Pre-answer ring timeout in seconds, measured from when
                    dialing begins

                    (the moment the request is accepted /
                    `command.session.dial.accepted` is emitted), NOT from

                    when the destination phone starts ringing. Call setup and
                    routing consume

                    part of this budget, so the callee experiences less ring
                    time than the value

                    set here. On expiry the dial ends with `session.ended`
                    (answered=false,

                    hangup_cause="timeout"). Distinct from `max_duration_sec`,
                    the post-answer cap.
                to:
                  type: string
                  description: >-
                    Destination number in international E.164 format with
                    leading `+` (e.g. `+972527121102`).

                    The schema validates canonical syntax only. Runtime country
                    and trunk policies

                    determine whether the destination is currently dialable; an
                    unsupported

                    destination is rejected with `400 invalid_request`.
              required:
                - from
                - max_duration_sec
                - ring_timeout_sec
                - to
servers:
  - url: https://api.telekesher.dev
    description: Gateway server
components:
  schemas:
    V1SessionsDialPostResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
        - dialing
      title: V1SessionsDialPostResponsesContentApplicationJsonSchemaStatus
    Call Control_createDial_Response_202:
      type: object
      properties:
        session_uuid:
          type: string
        status:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaStatus
      required:
        - session_uuid
        - status
      title: Call Control_createDial_Response_202
    V1SessionsDialPostResponsesContentApplicationJsonSchemaCode:
      type: string
      enum:
        - invalid_request
        - payload_too_large
        - result_set_too_large
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - recording_not_active
        - room_full
        - rate_limited
        - unavailable
        - internal
      description: >-
        Stable, machine-readable error class from a closed set of twelve values.
        Branch on this for programmatic handling. New codes are only added with
        a documented API change. Maps to the HTTP status as follows:
        `invalid_request` (400/415/422), `payload_too_large` and
        `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403),
        `not_found` (404), `recording_not_active` (400); `conflict` and
        `room_full` (409), `rate_limited` (429), `unavailable` (502/503/529),
        `internal` (500).


        Note: `413` is the only status shared by two codes — `payload_too_large`
        means the request body exceeded its size cap, while
        `result_set_too_large` means a list response exceeded the system result
        ceiling (narrow the query with filters and retry).


        Note: `unavailable` is the only code that maps to multiple HTTP
        statuses, which represent different retry conditions: `502` means a
        command dependency could not accept the request, `503` means a required
        service (including the idempotency store) is temporarily unavailable,
        and `529` means the gateway is overloaded with no spare capacity. Use
        the HTTP status and operation description, not just `code`, to
        distinguish them.
      title: V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
    CreateDialRequestBadRequestError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestBadRequestError
    CreateDialRequestUnauthorizedError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestUnauthorizedError
    CreateDialRequestForbiddenError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestForbiddenError
    CreateDialRequestConflictError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestConflictError
    CreateDialRequestContentTooLargeError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestContentTooLargeError
    CreateDialRequestUnsupportedMediaTypeError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestUnsupportedMediaTypeError
    CreateDialRequestUnprocessableEntityError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestUnprocessableEntityError
    CreateDialRequestInternalServerError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestInternalServerError
    CreateDialRequestServiceUnavailableError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsDialPostResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: CreateDialRequestServiceUnavailableError
  securitySchemes:
    bearerAppAuth:
      type: http
      scheme: bearer
      description: >-
        Application auth. Send `Authorization: Bearer <app_uuid>:<api_key>`. See
        [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication)
        for details.

```

## Examples



**Request**

```json
{
  "from": "+972747713001",
  "max_duration_sec": 3600,
  "ring_timeout_sec": 30,
  "to": "+972527121102"
}
```

**Response**

```json
{
  "session_uuid": "string",
  "status": "dialing"
}
```

**SDK Code**

```python Call Control_createDial_example
import requests

url = "https://api.telekesher.dev/v1/sessions:dial"

payload = {
    "from": "+972747713001",
    "max_duration_sec": 3600,
    "ring_timeout_sec": 30,
    "to": "+972527121102"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Call Control_createDial_example
const url = 'https://api.telekesher.dev/v1/sessions:dial';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"from":"+972747713001","max_duration_sec":3600,"ring_timeout_sec":30,"to":"+972527121102"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Call Control_createDial_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.telekesher.dev/v1/sessions:dial"

	payload := strings.NewReader("{\n  \"from\": \"+972747713001\",\n  \"max_duration_sec\": 3600,\n  \"ring_timeout_sec\": 30,\n  \"to\": \"+972527121102\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Call Control_createDial_example
require 'uri'
require 'net/http'

url = URI("https://api.telekesher.dev/v1/sessions:dial")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"from\": \"+972747713001\",\n  \"max_duration_sec\": 3600,\n  \"ring_timeout_sec\": 30,\n  \"to\": \"+972527121102\"\n}"

response = http.request(request)
puts response.read_body
```

```java Call Control_createDial_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.telekesher.dev/v1/sessions:dial")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from\": \"+972747713001\",\n  \"max_duration_sec\": 3600,\n  \"ring_timeout_sec\": 30,\n  \"to\": \"+972527121102\"\n}")
  .asString();
```

```php Call Control_createDial_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.telekesher.dev/v1/sessions:dial', [
  'body' => '{
  "from": "+972747713001",
  "max_duration_sec": 3600,
  "ring_timeout_sec": 30,
  "to": "+972527121102"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Call Control_createDial_example
using RestSharp;

var client = new RestClient("https://api.telekesher.dev/v1/sessions:dial");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from\": \"+972747713001\",\n  \"max_duration_sec\": 3600,\n  \"ring_timeout_sec\": 30,\n  \"to\": \"+972527121102\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Call Control_createDial_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "from": "+972747713001",
  "max_duration_sec": 3600,
  "ring_timeout_sec": 30,
  "to": "+972527121102"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.telekesher.dev/v1/sessions:dial")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```