Skip to main content
POST
/
media
Import Media
curl --request POST \
  --url https://api.politicalcomms.com/v1/media \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "source_url": "https://example.com/path/to/image.jpg",
  "organization_id": "01HX0000000000000000000000",
  "brand_id": "01HX0000000000000000000001",
  "name": "spring-outreach-hero"
}
'
{
  "success": true,
  "data": {
    "id": "med_abc123",
    "name": "spring-outreach-hero",
    "status": "importing",
    "created_at": "2025-03-10T12:00:00Z"
  }
}

Authorizations

X-API-Key
string
header
required

Authenticate every request by passing your API key in the X-API-Key header. Keys are scoped to your organization hierarchy.

Body

application/json
source_url
string<uri>
required
organization_id
string

Target organization for the media file. Defaults to the organization that owns the API key. Required only when targeting a sub-organization under an agency-tier parent; the API key must have access to the sub-organization (otherwise the request returns 403 ORG_ACCESS_DENIED).

brand_id
string

Optional. When provided, the media file is scoped to this brand and the brand's organization is used (must match organization_id if both are sent — otherwise returns 400 BRAND_ORG_MISMATCH).

name
string

Response

Import accepted (poll the media file for ready status)