---
title: "Create HTTP request definition"
method: POST
path: "/v1/http-request-definition"
tags: ["HTTP Request Definition"]
---

# Create HTTP request definition

`POST /v1/http-request-definition`

Creates a new HTTP request definition. The signing secret is only returned in this response and cannot be retrieved later.

## Request body

- CreateHttpRequestDefinitionInput — Input for creating an HTTP request definition
  - `scope` 'AGENT_OUTBOUND_DIAL', required — Scope: AGENT_OUTBOUND_DIAL
  - `url` string, uri, required — URL for the HTTP request
  - `description` string, nullable — Description of the HTTP request definition
  - `method` 'POST' | 'PUT' | 'PATCH' | 'GET' — HTTP method (default: POST)
  - `body` union — Request body template. Accepts a JSON object or a string with placeholders like {{phoneNumberToDial}}. Objects are serialized to JSON for storage.
    - string
    - object
  - `headers` object — Request headers as key-value pairs

## Response `201`

The created HTTP request definition with signing secret

- object
  - `data` HttpRequestDefinitionCreateResponse, required — HTTP request definition
    - `id` string, uuid, required — HTTP request definition ID
    - `scope` 'AGENT_OUTBOUND_DIAL', required — Scope of the HTTP request definition
    - `description` string, nullable, required — Description of the HTTP request definition
    - `url` string, required — URL for the HTTP request
    - `method` 'POST' | 'PUT' | 'PATCH' | 'GET', required — HTTP method: POST, PUT, PATCH, or GET
    - `body` string, nullable, required — Request body as a string
    - `parsedBody` union, required — Parsed body as a JSON object if valid JSON, otherwise the raw string
      - object
      - string
    - `headers` object, required — Request headers as key-value pairs
    - `createdAt` string, required — Creation timestamp
    - `updatedAt` string, required — Last update timestamp

## Other responses

- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.net/roarkhq/apis/roark-analytics-api.md) · [All operations](https://skmtc.net/roarkhq/apis/roark-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/roarkhq/roark-analytics-api/revisions/83528d3618ef/schema)
