{"openapi":"3.0.3","paths":{"/v1/requests":{"get":{"description":"Cursor page of calls for this workspace. Rows older than 30 days are deleted.\n\nWorks with a `read` or `write` key.","operationId":"requests.list","parameters":[{"name":"q","required":false,"in":"query","description":"Matches request id, route, or error code.","schema":{}},{"name":"errors","required":false,"in":"query","description":"true keeps rows that stored an error code.","schema":{"enum":["true"],"type":"string"}},{"name":"errorCode","required":false,"in":"query","schema":{}},{"name":"clientId","required":false,"in":"query","description":"Requests that acted for this client.","schema":{}},{"name":"route","required":false,"in":"query","description":"Route contains this text, for example /v1/posts.","schema":{}},{"name":"activity","required":false,"in":"query","description":"Comma-separated: publishing, channels, webhooks, clients, other. Publishing is /v1/posts and /v1/scheduler. Clients is /v1/clients.","schema":{}},{"name":"status","required":false,"in":"query","description":"Comma-separated: success, accepted, failed. Accepted is HTTP 202.","schema":{}},{"name":"timeline","required":false,"in":"query","schema":{"enum":["24h","7d","30d"],"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"cursor","required":false,"in":"query","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List request log entries","tags":["Requests"]}},"/v1/requests/export":{"get":{"description":"Same filters as the list. Up to 2,000 matching rows, newest first.\n\nWorks with a `read` or `write` key.","operationId":"requests.export","parameters":[{"name":"q","required":false,"in":"query","schema":{}},{"name":"errors","required":false,"in":"query","schema":{"enum":["true"],"type":"string"}},{"name":"errorCode","required":false,"in":"query","schema":{}},{"name":"clientId","required":false,"in":"query","description":"Requests that acted for this client.","schema":{}},{"name":"route","required":false,"in":"query","schema":{}},{"name":"activity","required":false,"in":"query","schema":{}},{"name":"status","required":false,"in":"query","schema":{}},{"name":"timeline","required":false,"in":"query","schema":{"enum":["24h","7d","30d"],"type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Export request log as CSV","tags":["Requests"]}},"/v1/requests/{requestId}":{"get":{"operationId":"requests.get","parameters":[{"name":"requestId","required":true,"in":"path","schema":{"example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogEntryDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`REQUEST_NOT_FOUND` — Request log entry not found or not accessible to this workspace. Check the request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get one request log entry","tags":["Requests"],"description":"Works with a `read` or `write` key."}},"/v1/applications":{"post":{"description":"Names are unique in a workspace (ignoring case). Creating one that exists answers 409 APPLICATION_NAME_TAKEN with details.applicationId, so a retried call is safe.\n\nNeeds a `write` key.","operationId":"applications.create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApplicationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponseDto"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`APPLICATION_NAME_TAKEN` — An application with this name already exists in this workspace. Use the existing application (details.applicationId), or choose another name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create an application","tags":["Applications"]},"get":{"operationId":"applications.list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationListResponseDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List applications","tags":["Applications"],"description":"Works with a `read` or `write` key."}},"/v1/actions":{"get":{"operationId":"actions.list","parameters":[{"name":"cursor","required":false,"in":"query","description":"Previous page meta.cursor.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List account actions","tags":["Actions"],"description":"Works with a `read` or `write` key."}},"/v1/clients":{"get":{"operationId":"clients.list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientsListResponseDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List clients","tags":["Clients"],"description":"Works with a `read` or `write` key."},"post":{"description":"A client is one of your customers. Their channels, media, and posts stay separate from other clients. Your own accounts are on the `self` client, which every account has. Send `X-Client-Id` with the returned id to act for this client.\n\nNeeds a `write` key.","operationId":"clients.create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponseDto"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`CLIENT_SLUG_TAKEN` — This slug is already used in this workspace. Pick another slug, or use the existing client from GET /v1/clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`CLIENT_LIMIT_REACHED` — Your plan's client limit has been reached. Upgrade your plan or delete a client you no longer serve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create a client","tags":["Clients"]}},"/v1/clients/{clientId}":{"delete":{"description":"Refused with 409 CLIENT_HAS_CHANNELS while the client has connected channels. The self client cannot be deleted. Needs a key for all clients, like creating one. Keys limited to this client can act for no client afterwards.\n\nNeeds a `write` key.","operationId":"clients.delete","parameters":[{"name":"clientId","required":true,"in":"path","schema":{"example":"cli_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"204":{"description":"Client deleted."},"400":{"description":"`CLIENT_SELF_PROTECTED` — The self client holds your own accounts and can't be deleted. Delete a customer client instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`CLIENT_HAS_CHANNELS` — This client still has connected channels. Disconnect them before deleting the client. Disconnect the client's channels with DELETE /v1/channels/{channelId}, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete a client","tags":["Clients"]}},"/v1/billing/channels/preview":{"get":{"operationId":"billing.preview_channel","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"The LuftSocial pricing preview for one more non-X channel, passed through unchanged. Its fields are not part of this contract yet."}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`DEVELOPER_CUSTOM_PRICING_REQUIRED` — Self-serve stops at 200 connected accounts. Account 201 needs custom pricing. Contact LuftSocial for a custom account price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Preview the price of connecting one more channel","tags":["Billing"],"description":"Works with a `read` or `write` key."}},"/v1/billing/slots":{"get":{"description":"pendingPurchase is null only when nothing is in progress; lastPurchase.status (pending, needs_review, applied, not_applied) is the outcome of the newest purchase. slotsAllocated is not a payment receipt. pendingSlots is a scheduled reduction.\n\nWorks with a `read` or `write` key.","operationId":"billing.get_slots","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["slotsAllocated","paidSlots","capacity","channelsConnected","freeChannels","monthlyCostUsd","billingAnchorDay","pendingSlots","pendingPurchase","lastPurchase"],"properties":{"slotsAllocated":{"type":"integer","example":5,"description":"Total channel slots on the account, including the included (free) ones. Not a payment receipt."},"paidSlots":{"type":"integer","example":3,"description":"Slots above the included channels."},"capacity":{"type":"integer","example":5,"description":"Live non-X channels the account may hold right now."},"channelsConnected":{"type":"integer","example":4,"description":"Live non-X channels connected right now."},"freeChannels":{"type":"integer","example":2,"description":"Channels included in the plan."},"monthlyCostUsd":{"type":"number","example":15,"description":"Monthly cost of slotsAllocated, in US dollars."},"billingAnchorDay":{"type":"integer","nullable":true,"example":12,"description":"Day of the month slots renew and scheduled reductions apply. Null when the account has none yet."},"pendingSlots":{"type":"integer","nullable":true,"example":null,"description":"A scheduled reduction: the quantity that applies on billingAnchorDay. Null when none is scheduled."},"pendingPurchase":{"type":"object","nullable":true,"required":["purchaseId","targetSlots","status","reason","resolvedAt","resolvedBy"],"properties":{"purchaseId":{"type":"string","example":"sbo_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"targetSlots":{"type":"integer","example":5},"status":{"type":"string","enum":["pending","needs_review","applied","not_applied"],"example":"applied","description":"pending: the charge is in progress. needs_review: the outcome is being confirmed. applied: the slots were added. not_applied: nothing was added; see reason."},"reason":{"type":"string","nullable":true,"example":null,"description":"Why a purchase was not applied. Null otherwise."},"resolvedAt":{"type":"string","format":"date-time","nullable":true,"example":"2026-11-12T09:30:00.000Z"},"resolvedBy":{"type":"string","enum":["system"],"nullable":true,"example":"system"}},"example":null,"description":"The purchase in progress. Null when nothing is in progress."},"lastPurchase":{"type":"object","nullable":true,"required":["purchaseId","targetSlots","status","reason","resolvedAt","resolvedBy"],"properties":{"purchaseId":{"type":"string","example":"sbo_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"targetSlots":{"type":"integer","example":5},"status":{"type":"string","enum":["pending","needs_review","applied","not_applied"],"example":"applied","description":"pending: the charge is in progress. needs_review: the outcome is being confirmed. applied: the slots were added. not_applied: nothing was added; see reason."},"reason":{"type":"string","nullable":true,"example":null,"description":"Why a purchase was not applied. Null otherwise."},"resolvedAt":{"type":"string","format":"date-time","nullable":true,"example":"2026-11-12T09:30:00.000Z"},"resolvedBy":{"type":"string","enum":["system"],"nullable":true,"example":"system"}},"description":"The newest purchase and its outcome. Null before the first."}}}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get channel slot state","tags":["Billing"]},"post":{"operationId":"billing.update_slots","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["quantity"],"properties":{"quantity":{"type":"integer","minimum":0,"example":6,"description":"The slot quantity you want. Higher than slotsAllocated buys slots now; lower schedules a reduction for billingAnchorDay; equal cancels a scheduled reduction, else changes nothing."}}},"examples":{"raise":{"summary":"Raise to 6 slots","value":{"quantity":6}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["slotsAllocated","paidSlots","capacity","channelsConnected","freeChannels","monthlyCostUsd","billingAnchorDay","pendingSlots"],"properties":{"slotsAllocated":{"type":"integer","example":5,"description":"Total channel slots on the account, including the included (free) ones. Not a payment receipt."},"paidSlots":{"type":"integer","example":3,"description":"Slots above the included channels."},"capacity":{"type":"integer","example":5,"description":"Live non-X channels the account may hold right now."},"channelsConnected":{"type":"integer","example":4,"description":"Live non-X channels connected right now."},"freeChannels":{"type":"integer","example":2,"description":"Channels included in the plan."},"monthlyCostUsd":{"type":"number","example":15,"description":"Monthly cost of slotsAllocated, in US dollars."},"billingAnchorDay":{"type":"integer","nullable":true,"example":12,"description":"Day of the month slots renew and scheduled reductions apply. Null when the account has none yet."},"pendingSlots":{"type":"integer","nullable":true,"example":null,"description":"A scheduled reduction: the quantity that applies on billingAnchorDay. Null when none is scheduled."}}}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`PAYMENT_METHOD_REQUIRED` — A payment method is required before buying channel slots. Add a card in the developer console billing page, then retry the purchase.\n\n`SLOT_REDUCTION_BLOCKED` — Cannot reduce slots below the number of currently connected channels. Disconnect some channels first, then reduce your slot allocation.\n\n`SLOT_CHARGE_FAILED` — The slot purchase could not be charged to your payment method; no slots were added. Check the card on file in the developer console billing page, then retry.\n\n`DEVELOPER_CUSTOM_PRICING_REQUIRED` — Self-serve stops at 200 connected accounts. Account 201 needs custom pricing. Contact LuftSocial for a custom account price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`SLOT_QUANTITY_CHANGED` — The channel slot quantity changed while this request ran. Read GET /v1/billing/slots and send the new quantity again.\n\n`SLOT_PURCHASE_PENDING` — A slot purchase for this account is still being confirmed; its slots are added only once the payment is confirmed. Wait for the Retry-After interval, then read GET /v1/billing/slots before sending a new quantity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`SLOT_CHARGE_NOT_APPLIED` — The payment provider rejected the slot change before applying it; nothing was charged and no slots were added. Read GET /v1/billing/slots, then send the quantity again. Contact support if it keeps happening.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Set the channel slot quantity","tags":["Billing"],"description":"Needs a `write` key."}},"/v1/billing/slots/preview":{"get":{"operationId":"billing.preview_slots","parameters":[{"name":"quantity","required":true,"in":"query","description":"The slot quantity to price. A non-negative whole number.","schema":{"type":"integer","minimum":0,"example":6}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["slotsAllocated","paidSlots","capacity","channelsConnected","freeChannels","monthlyCostUsd","billingAnchorDay","pendingSlots","quantity","proratedUsd","breakdown","effectiveFrom"],"properties":{"slotsAllocated":{"type":"integer","example":5,"description":"Total channel slots on the account, including the included (free) ones. Not a payment receipt."},"paidSlots":{"type":"integer","example":3,"description":"Slots above the included channels."},"capacity":{"type":"integer","example":5,"description":"Live non-X channels the account may hold right now."},"channelsConnected":{"type":"integer","example":4,"description":"Live non-X channels connected right now."},"freeChannels":{"type":"integer","example":2,"description":"Channels included in the plan."},"monthlyCostUsd":{"type":"number","example":20,"description":"Monthly cost at the previewed quantity, in US dollars."},"billingAnchorDay":{"type":"integer","nullable":true,"example":12,"description":"Day of the month slots renew and scheduled reductions apply. Null when the account has none yet."},"pendingSlots":{"type":"integer","nullable":true,"example":null,"description":"A scheduled reduction: the quantity that applies on billingAnchorDay. Null when none is scheduled."},"quantity":{"type":"integer","example":6,"description":"The quantity you asked about."},"proratedUsd":{"type":"number","example":2.5,"description":"Estimate of the charge now, in US dollars: the monthly increase prorated for the days left in the cycle. 0 for a reduction. Stripe computes the real charge."},"breakdown":{"type":"object","required":["free","band3To10","band11To100","band101To200"],"description":"How many of the previewed slots fall in each price band.","properties":{"free":{"type":"integer","example":2},"band3To10":{"type":"integer","example":4},"band11To100":{"type":"integer","example":0},"band101To200":{"type":"integer","example":0}}},"effectiveFrom":{"type":"string","format":"date-time","example":"2026-11-12T09:30:00.000Z","description":"The time the preview was computed."}}}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`DEVELOPER_CUSTOM_PRICING_REQUIRED` — Self-serve stops at 200 connected accounts. Account 201 needs custom pricing. Contact LuftSocial for a custom account price.\n\n`SLOT_REDUCTION_BLOCKED` — Cannot reduce slots below the number of currently connected channels. Disconnect some channels first, then reduce your slot allocation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Preview the price of a new slot quantity","tags":["Billing"],"description":"Works with a `read` or `write` key."}},"/v1/webhooks":{"post":{"description":"The signing secret is returned once. Send Idempotency-Key and reuse it if this call times out. Events are signed in X-Luft-Signature as t=<unix>,v1=<hex>.\n\nNeeds a `write` key.","operationId":"webhooks.create","parameters":[{"name":"Idempotency-Key","in":"header","description":"1–255 characters, [A-Za-z0-9_-]. Reuse it to read the same secret.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedDto"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.\n\n`WEBHOOK_URL_BLOCKED` — The webhook URL failed the SSRF safety check. Use a public HTTPS URL that does not resolve to a private, loopback, link-local, or cloud metadata address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`IDEMPOTENCY_KEY_REUSED` — An earlier request used this Idempotency-Key with a different body. Use a new Idempotency-Key for this request, or resend the original body to replay the first result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create a webhook endpoint","tags":["Webhooks"]},"get":{"operationId":"webhooks.list","parameters":[{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List webhook endpoints","tags":["Webhooks"],"description":"Works with a `read` or `write` key."}},"/v1/webhooks/{webhookId}":{"delete":{"operationId":"webhooks.delete","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"example":"whe_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","example":"deleted"}}}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`WEBHOOK_NOT_FOUND` — Webhook endpoint not found or not accessible to this application. Check the webhook ID and that it belongs to this application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete a webhook endpoint","tags":["Webhooks"],"description":"Needs a `write` key."}},"/v1/webhooks/{webhookId}/rotate-secret":{"post":{"description":"The new secret is returned once. The previous secret still verifies deliveries for 24 hours.\n\nNeeds a `write` key.","operationId":"webhooks.rotate_secret","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"example":"whe_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`WEBHOOK_NOT_FOUND` — Webhook endpoint not found or not accessible to this application. Check the webhook ID and that it belongs to this application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Rotate a webhook signing secret","tags":["Webhooks"]}},"/v1/webhooks/deliveries":{"get":{"description":"Attempt log for this workspace. Response bodies are not stored.\n\nWorks with a `read` or `write` key.","operationId":"webhooks.list_deliveries","parameters":[{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List webhook deliveries","tags":["Webhooks"]}},"/v1/posts/preflight":{"post":{"description":"Checks the client, channels, X credentials, and every destination's media with the same rules publishing uses. Does not publish and does not reserve an idempotency key. Each destination lists media issues with a severity: error (the network rejects it, ok is false), warning (posts but may be cropped or scaled), info (we change the file, e.g. convert or resize, see autoFix). Each issue links to its page under /media-issues.\n\nWorks with a `read` or `write` key.","operationId":"posts.preflight","parameters":[{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Omitted: the key’s default client, else the client of the destination channels.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostDto"},"examples":{"launch":{"summary":"Reel, photo, and Short","value":{"caption":"Launch day","destinations":[{"channelId":"ch_instagram","postType":"REELS","mediaAssetIds":["asset_reel_video"]},{"channelId":"ch_facebook","postType":"IMAGE","caption":"Launch day on Facebook","mediaAssetIds":["asset_facebook_photo"]},{"channelId":"ch_youtube","postType":"SHORTS","title":"Launch day short","mediaAssetIds":["asset_youtube_short"]}]}}}}}},"responses":{"201":{"description":"Checked. ok is false when any destination has an error issue. Nothing was queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`X_ALLOWANCE_REQUIRED` — Connecting or posting to X on LuftSocial's X app requires paid X credit. Pay for X credit, or connect X with your own X app credentials.\n\n`X_CREDIT_SHORTFALL_LIMIT_REACHED` — An earlier X call used more than your remaining X credit, and that shortfall (at most $1.00) is unpaid. X on LuftSocial's X app is blocked until you top up. Top up your X credit wallet in the developer billing console. The top-up clears the shortfall first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.\n\n`X_NOT_ENTITLED` — Your plan does not include X posting. Add the X add-on to continue. Add the X add-on to your plan, or supply your own X app credentials on the Developer plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`CHANNEL_NOT_FOUND` — Channel not found or not accessible to this workspace. Check the channel ID and that it belongs to this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`CHANNEL_NOT_CONNECTED` — This channel is disconnected or needs to be reconnected. Connect the account again with POST /v1/channels/connect/{platform} (send channelId when GET /v1/channels still lists the channel), then retry.\n\n`CLIENT_PLATFORM_SLOT_TAKEN` — This client already has an account connected on that platform. Disconnect the existing account first, or add a new client for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`X_CREDENTIALS_REQUIRED` — This X channel uses your own X app, and those credentials are missing, inactive, or not verified by X. Submit your X app credentials via POST /v1/channels/x/credentials, or connect X on LuftSocial's X app with paid X credit.\n\n`X_RECONNECT_REQUIRED` — This X channel was connected through an X app that is no longer the one it can publish with. The workspace's X app was replaced or removed, its credentials are no longer active and verified, or the connection predates app tracking. Reconnect the channel with POST /v1/channels/connect/x. It then uses your current X app, or LuftSocial's X app with paid X credit when no X app is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Check a post before publishing","tags":["Posts"]}},"/v1/posts":{"post":{"description":"Accepts the post and returns it with status queued. It moves to scheduled (when scheduledAt is set) or publishing once handed to the network, then to published, partially_published, or failed when the network confirms. Subscribe to the post.published and post.failed webhooks, or poll GET /v1/posts/{postId}.\n\nIdempotency-Key is required. Generate it before this call and reuse it if the call times out. A UUID v4 (`crypto.randomUUID()`) or your own order id is the value to send. 1–255 characters, [A-Za-z0-9_-].\n\nThe same key and the same body replay the original post and set Idempotent-Replayed: true. The replay stays 202 and returns the post as it is now (id, status, requestId). The same key with a different body is 409 IDEMPOTENCY_KEY_REUSED. A key already used for a post on another client, or on a client this API key cannot use, is also 409 IDEMPOTENCY_KEY_REUSED, whatever the body. The key is kept for this application for the life of the post.\n\nPut each network’s media on that destination. A Reel, a Facebook photo, and a YouTube Short do not share one file list.\n\nNeeds a `write` key.","operationId":"posts.create","parameters":[{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Omitted: the key’s default client, else the client of the destination channels.","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Caller-generated id for this attempt. UUID v4 or your order id. Send the same value on retry. 1–255 characters, [A-Za-z0-9_-].","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_-]+$","example":"3f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostDto"},"examples":{"launch":{"summary":"Reel, photo, and Short","value":{"caption":"Launch day","destinations":[{"channelId":"ch_instagram","postType":"REELS","mediaAssetIds":["asset_reel_video"]},{"channelId":"ch_facebook","postType":"IMAGE","caption":"Launch day on Facebook","mediaAssetIds":["asset_facebook_photo"]},{"channelId":"ch_youtube","postType":"SHORTS","title":"Launch day short","mediaAssetIds":["asset_youtube_short"]}]}}}}}},"responses":{"202":{"description":"Post accepted. Poll GET /v1/posts/{postId}. A replay of the same key also returns 202.","headers":{"Idempotent-Replayed":{"description":"Set to true when this response is a replay of the original attempt.","schema":{"type":"string","example":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedPostResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`X_ALLOWANCE_REQUIRED` — Connecting or posting to X on LuftSocial's X app requires paid X credit. Pay for X credit, or connect X with your own X app credentials.\n\n`X_CREDIT_SHORTFALL_LIMIT_REACHED` — An earlier X call used more than your remaining X credit, and that shortfall (at most $1.00) is unpaid. X on LuftSocial's X app is blocked until you top up. Top up your X credit wallet in the developer billing console. The top-up clears the shortfall first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.\n\n`X_NOT_ENTITLED` — Your plan does not include X posting. Add the X add-on to continue. Add the X add-on to your plan, or supply your own X app credentials on the Developer plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`CHANNEL_NOT_FOUND` — Channel not found or not accessible to this workspace. Check the channel ID and that it belongs to this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`CHANNEL_NOT_CONNECTED` — This channel is disconnected or needs to be reconnected. Connect the account again with POST /v1/channels/connect/{platform} (send channelId when GET /v1/channels still lists the channel), then retry.\n\n`IDEMPOTENCY_KEY_REUSED` — An earlier request used this Idempotency-Key with a different body. Use a new Idempotency-Key for this request, or resend the original body to replay the first result.\n\n`CLIENT_PLATFORM_SLOT_TAKEN` — This client already has an account connected on that platform. Disconnect the existing account first, or add a new client for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`X_ALLOWANCE_EXHAUSTED` — Your X posting wallet is empty for this billing period. Add X credits to your wallet or wait until the next billing period.\n\n`X_CREDENTIALS_REQUIRED` — This X channel uses your own X app, and those credentials are missing, inactive, or not verified by X. Submit your X app credentials via POST /v1/channels/x/credentials, or connect X on LuftSocial's X app with paid X credit.\n\n`X_RECONNECT_REQUIRED` — This X channel was connected through an X app that is no longer the one it can publish with. The workspace's X app was replaced or removed, its credentials are no longer active and verified, or the connection predates app tracking. Reconnect the channel with POST /v1/channels/connect/x. It then uses your current X app, or LuftSocial's X app with paid X credit when no X app is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`PLATFORM_OUTAGE` — The social platform is currently experiencing an outage. New posts cannot be accepted. Check GET /v1/status for the latest incident details and retry when the incident is resolved.\n\n`QUEUE_SATURATED` — The publish queue is saturated. New write requests cannot be accepted right now. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","example":30}}}}},"summary":"Publish or schedule a post","tags":["Posts"]},"get":{"description":"Posts this application created, newest first, failed ones included. Filter with status (comma-separated). Posts made in the LuftSocial app are not listed: the API sees only its own posts.\n\nWorks with a `read` or `write` key.","operationId":"posts.list","parameters":[{"name":"status","required":false,"in":"query","description":"Comma-separated: queued, scheduled, publishing, published, partially_published, failed, cancelled.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostListResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List posts","tags":["Posts"]}},"/v1/posts/{postId}":{"get":{"description":"Returns a post this application created. queued and running are normal. publishId and errorCode are set when publishing finishes.\n\nWorks with a `read` or `write` key.","operationId":"posts.get","parameters":[{"name":"postId","required":true,"in":"path","schema":{"example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`POST_NOT_FOUND` — Post not found or not accessible to this workspace. Check the post ID and that it was created by this application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`POST_NOT_READY` — The post is still being processed. Poll again after the Retry-After interval. Wait for the Retry-After interval and call GET /v1/posts/{postId} again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get a post","tags":["Posts"]},"patch":{"description":"Works on a post created with scheduledAt while it is queued or scheduled. Send scheduledAt, caption, or both. Any other post returns 409 POST_NOT_EDITABLE.\n\nNeeds a `write` key.","operationId":"posts.update","parameters":[{"name":"postId","required":true,"in":"path","schema":{"example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`POST_NOT_FOUND` — Post not found or not accessible to this workspace. Check the post ID and that it was created by this application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`POST_NOT_EDITABLE` — Only a queued or scheduled post created with scheduledAt can be changed. Read the post with GET /v1/posts/{postId}. A post that is publishing or finished cannot be changed.\n\n`POST_HANDOFF_IN_PROGRESS` — The post is being handed to the publisher and cannot be changed or cancelled right now. Read GET /v1/posts/{postId} again in a minute; once it is scheduled you can edit or cancel it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Reschedule a post or change its caption","tags":["Posts"]},"delete":{"description":"Cancels a post that is queued or scheduled. The post stays readable with status cancelled. Cancelling it again also returns 204. A post that is publishing or finished returns 409 POST_NOT_CANCELLABLE.\n\nNeeds a `write` key.","operationId":"posts.cancel","parameters":[{"name":"postId","required":true,"in":"path","schema":{"example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ","type":"string"}}],"responses":{"204":{"description":"Post cancelled."},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`POST_NOT_FOUND` — Post not found or not accessible to this workspace. Check the post ID and that it was created by this application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`POST_NOT_CANCELLABLE` — Only queued or scheduled posts can be cancelled. The post is already publishing or finished and cannot be cancelled.\n\n`POST_HANDOFF_IN_PROGRESS` — The post is being handed to the publisher and cannot be changed or cancelled right now. Read GET /v1/posts/{postId} again in a minute; once it is scheduled you can edit or cancel it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Cancel a post","tags":["Posts"]}},"/v1/status":{"get":{"description":"Open incidents for every network. A hard-down incident rejects new publishes to that network. A soft incident keeps those posts queued until it clears.\n\nWorks with a `read` or `write` key.","operationId":"status.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformStatusResponseDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List open platform incidents","tags":["Status"]}},"/v1/scheduler/posts":{"get":{"description":"Posts this application created with a scheduledAt that have not started publishing. Reschedule one with PATCH /v1/posts/{postId}, cancel it with DELETE /v1/posts/{postId}.\n\nWorks with a `read` or `write` key.","operationId":"scheduler.list_posts","parameters":[{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":50,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPostListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List scheduled posts","tags":["Scheduler"]}},"/v1/issues":{"get":{"description":"Failed posts, webhook endpoints that exhausted retries, open platform incidents, and channels that need reconnect. Newest first.\n\nWorks with a `read` or `write` key.","operationId":"issues.list","parameters":[{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueListDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List open issues","tags":["Issues"]}},"/v1/channels":{"get":{"description":"Channel ids from this list are the channelId values on POST /v1/posts. With X-Client-Id, only that client’s channels (403 CLIENT_NOT_ALLOWED for a client outside the key). The key’s default client does not filter the list.\n\nWorks with a `read` or `write` key.","operationId":"channels.list","parameters":[{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). When set, the client must belong to this workspace.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelsListResponseDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List connected channels","tags":["Channels"]}},"/v1/channels/connect/{platform}":{"post":{"description":"Returns a LuftSocial link for the client’s customer (or you, for self). They approve on the network with no LuftSocial login, and return to redirectUrl. Follow it with channel.connected or connect.failed, or GET /v1/connect/sessions/{sessionId}. Send channelId to reconnect that channel.\n\nNeeds a `write` key.","operationId":"channels.connect_url","parameters":[{"name":"platform","required":true,"in":"path","description":"The network to connect.","schema":{"enum":["facebook","instagram","threads","tiktok","linkedin","youtube","pinterest","x"],"type":"string"}},{"name":"X-Client-Id","in":"header","description":"Client the account is for. Omitted: the key’s default client, else self.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConnectDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLinkDto"}}}},"400":{"description":"`REDIRECT_URL_NOT_ALLOWED` — redirectUrl is not one of this application's redirect URLs. Add the exact URL to the application's redirect URLs in the developer console, or omit redirectUrl.\n\n`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`CHANNEL_FREE_ALLOWANCE_EXCEEDED` — You have used your free channel allowance. Add a payment method to connect more channels. Add a payment method in the billing settings and retry.\n\n`SLOT_LIMIT_REACHED` — You have reached your channel slot limit. Purchase more slots to connect additional channels. Buy more channel slots from the billing dashboard, then retry.\n\n`X_ALLOWANCE_REQUIRED` — Connecting or posting to X on LuftSocial's X app requires paid X credit. Pay for X credit, or connect X with your own X app credentials.\n\n`X_CREDIT_SHORTFALL_LIMIT_REACHED` — An earlier X call used more than your remaining X credit, and that shortfall (at most $1.00) is unpaid. X on LuftSocial's X app is blocked until you top up. Top up your X credit wallet in the developer billing console. The top-up clears the shortfall first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`CHANNEL_NOT_FOUND` — Channel not found or not accessible to this workspace. Check the channel ID and that it belongs to this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`X_CREDENTIALS_REQUIRED` — This X channel uses your own X app, and those credentials are missing, inactive, or not verified by X. Submit your X app credentials via POST /v1/channels/x/credentials, or connect X on LuftSocial's X app with paid X credit.\n\n`X_RECONNECT_REQUIRED` — This X channel was connected through an X app that is no longer the one it can publish with. The workspace's X app was replaced or removed, its credentials are no longer active and verified, or the connection predates app tracking. Reconnect the channel with POST /v1/channels/connect/x. It then uses your current X app, or LuftSocial's X app with paid X credit when no X app is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get a hosted connect link","tags":["Channels"]}},"/v1/channels/x/credentials":{"post":{"description":"## Connect an X account\n\nDo this once for the workspace. Posts go out through your X app.\n\n1. Open [developer.x.com](https://developer.x.com) and create an app, or open the app you already have.\n2. Open **User authentication settings** and choose **Set up**. Set the app type to **Web App**, so X gives you a client secret.\n3. Set the callback URL to the environment you connect from. It has to match exactly.\n   - Production: `https://luftsocial.com/dashboard/social`\n   - QA: `https://qa.luftsocial.com/dashboard/social`\n   Set the website URL to `https://luftsocial.com` or `https://qa.luftsocial.com`.\n4. Turn on `tweet.read`, `tweet.write`, `users.read`, `offline.access`, `media.write`, `dm.read`, and `dm.write`.\n5. Copy the OAuth 2.0 Client ID and Client Secret.\n6. `POST /v1/channels/x/credentials` with `appId` and `appSecret`. We ask X to accept them before anything is stored. If X rejects them, nothing is saved. The secret is encrypted and is not returned. Posting again with the same `appId` replaces the stored secret after a fresh verify (upsert). A different `appId` becomes the active app and deactivates the previous one: X accounts connected through the previous app must reconnect before they post again, and `affectedCount` in the response says how many (`affectedChannels` is the same number under its old name, deprecated).\n7. Connect the X account from the dashboard. X sends the person back to that callback URL.\n\nNeeds a `write` key.","operationId":"channels.store_x_credentials","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateXCredentialDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XCredentialResponseDto"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`X_APP_REPLACEMENT_UNCONFIRMED` — Storing this X app would replace your current one, and X channels connected through the current app would have to reconnect before they publish again. Resend with confirmReplace: true to replace the app, then reconnect the affected channels with POST /v1/channels/connect/x. To keep them working, store your current app again instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Store X app credentials","tags":["Channels"]}},"/v1/channels/{channelId}/boards":{"get":{"description":"The boardId values a Pinterest destination may send in platformSpecificParams.boardId (and additionalBoards). Boards come from a 15-minute cache; send refresh=true after creating a board on Pinterest.\n\nWorks with a `read` or `write` key.","operationId":"channels.list_boards","parameters":[{"name":"channelId","required":true,"in":"path","schema":{"example":"ch_pinterest","type":"string"}},{"name":"refresh","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelBoardsResponseDto"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CHANNEL_NOT_FOUND` — Channel not found or not accessible to this workspace. Check the channel ID and that it belongs to this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`CHANNEL_NOT_CONNECTED` — This channel is disconnected or needs to be reconnected. Connect the account again with POST /v1/channels/connect/{platform} (send channelId when GET /v1/channels still lists the channel), then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List a Pinterest channel's boards","tags":["Channels"]}},"/v1/channels/{channelId}":{"delete":{"operationId":"channels.disconnect","parameters":[{"name":"channelId","required":true,"in":"path","schema":{"example":"ch_instagram","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","example":"disconnected"}}}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`CHANNEL_NOT_FOUND` — Channel not found or not accessible to this workspace. Check the channel ID and that it belongs to this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Disconnect a channel","tags":["Channels"],"description":"Needs a `write` key."}},"/v1/connect/sessions/{sessionId}":{"get":{"description":"How a hosted connect link ended, or where it is. The channel id is set once it completes.\n\nWorks with a `read` or `write` key.","operationId":"connect.get_session","parameters":[{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSessionDto"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CONNECT_SESSION_NOT_FOUND` — Connect session not found or not accessible to this key. Use the sessionId returned by POST /v1/channels/connect/{platform}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get a connect session","tags":["Channels"]}},"/v1/media/uploads":{"post":{"description":"Reserves a media asset for the client and returns a presigned uploadUrl. Then:\n\n1. PUT the file to uploadUrl as the raw body, with uploadHeaders exactly as given. fileSize must match.\n\n2. Call POST /v1/media/{assetId}/complete.\n\n3. Use assetId in mediaAssetIds on POST /v1/posts.\n\nWhen status is ready the client already has the same file (send fileHash to get this) and you skip steps 1 and 2.\n\nFiles count toward the workspace storage pool. Up to 1 GB per file.\n\nNeeds a `write` key.","operationId":"media.upload","parameters":[{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Media belongs to one client; post with the same one. Omitted: the key’s default client, else self.","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Caller-generated id for this upload. Send the same value on retry to get the same asset back. 1–255 characters, [A-Za-z0-9_-].","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_-]+$","example":"3f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaUploadDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUploadResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.\n\n`STORAGE_QUOTA_EXCEEDED` — This upload would exceed the workspace storage pool. Delete unused media. Each extra non-X channel adds 2 GB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`IDEMPOTENCY_KEY_REUSED` — An earlier request used this Idempotency-Key with a different body. Use a new Idempotency-Key for this request, or resend the original body to replay the first result.\n\n`IDEMPOTENCY_REQUEST_IN_PROGRESS` — The first request with this Idempotency-Key is still running. Wait a second and resend the same request with the same Idempotency-Key.\n\n`IDEMPOTENCY_OUTCOME_UNKNOWN` — An earlier request with this Idempotency-Key may have completed, but its result can't be confirmed. Check GET /v1/media/{assetId} if you have the id; otherwise retry with a new Idempotency-Key. The earlier attempt may have stored a file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"`MEDIA_TOO_LARGE` — The media file is larger than the upload limit. Compress or trim the file to under details.limit bytes, then upload it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Start a media upload","tags":["Media"]}},"/v1/media/{assetId}/complete":{"post":{"description":"Call after the PUT to uploadUrl succeeds. Returns the asset with status ready. 409 MEDIA_UPLOAD_INCOMPLETE means the file has not arrived yet. Calling it again on a ready asset returns it unchanged.\n\nNeeds a `write` key.","operationId":"media.complete","parameters":[{"name":"assetId","required":true,"in":"path","schema":{"example":"6f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2","type":"string"}},{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Media belongs to one client; post with the same one. Omitted: the key’s default client, else self.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`MEDIA_NOT_FOUND` — Media asset not found in this brand. Check the assetId and the brand. Upload with POST /v1/media/uploads or POST /v1/media/import to get one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`MEDIA_UPLOAD_INCOMPLETE` — The file has not been uploaded to uploadUrl yet. PUT the file to uploadUrl with uploadHeaders, then call complete again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Finish a media upload","tags":["Media"]}},"/v1/media/import":{"post":{"description":"Fetches a public HTTPS image or video into the client’s media and returns it ready to post. Use this when the file is already online; use POST /v1/media/uploads for local files. Large videos can take up to a minute.\n\nNeeds a `write` key.","operationId":"media.import","parameters":[{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Media belongs to one client; post with the same one. Omitted: the key’s default client, else self.","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Caller-generated id for this upload. Send the same value on retry to get the same asset back. 1–255 characters, [A-Za-z0-9_-].","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9_-]+$","example":"3f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMediaDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"400":{"description":"`VALIDATION_FAILED` — One or more request fields failed validation. Fix the fields listed in details.errors and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.\n\n`STORAGE_QUOTA_EXCEEDED` — This upload would exceed the workspace storage pool. Delete unused media. Each extra non-X channel adds 2 GB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`IDEMPOTENCY_KEY_REUSED` — An earlier request used this Idempotency-Key with a different body. Use a new Idempotency-Key for this request, or resend the original body to replay the first result.\n\n`IDEMPOTENCY_REQUEST_IN_PROGRESS` — The first request with this Idempotency-Key is still running. Wait a second and resend the same request with the same Idempotency-Key.\n\n`IDEMPOTENCY_OUTCOME_UNKNOWN` — An earlier request with this Idempotency-Key may have completed, but its result can't be confirmed. Check GET /v1/media/{assetId} if you have the id; otherwise retry with a new Idempotency-Key. The earlier attempt may have stored a file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"`MEDIA_TOO_LARGE` — The media file is larger than the upload limit. Compress or trim the file to under details.limit bytes, then upload it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`MEDIA_IMPORT_FAILED` — The media at sourceUrl could not be imported. Use a public HTTPS URL that returns an image or video. details.reason says what went wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Import media from a URL","tags":["Media"]}},"/v1/media/{assetId}":{"get":{"description":"Returns the asset and whether it is ready to post. 404 MEDIA_NOT_FOUND when it is not in this client’s media.\n\nWorks with a `read` or `write` key.","operationId":"media.get","parameters":[{"name":"assetId","required":true,"in":"path","schema":{"example":"6f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2","type":"string"}},{"name":"X-Client-Id","in":"header","description":"Client id (cli_…). Media belongs to one client; post with the same one. Omitted: the key’s default client, else self.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"401":{"description":"`API_KEY_MISSING` — No Authorization header was provided. Include your API key as a Bearer token in the Authorization header.\n\n`API_KEY_INVALID` — The API key is unknown, revoked, or supplied as a query parameter. Check that your key is valid, not revoked, and sent in the Authorization header — not in the URL.\n\n`API_KEY_EXPIRED` — The API key has passed its expiry time. Create a new key in the dashboard and replace this one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"`ACCOUNT_SUSPENDED` — API access for this workspace is not active. Ask the workspace owner to restore the workspace, or contact LuftSocial support.\n\n`PERMISSION_REQUIRED` — This API key is read-only. This operation changes data and needs a write key. Use a write key, or create one in the dashboard.\n\n`CLIENT_NOT_ALLOWED` — This API key is limited to other clients, or the operation covers the whole account. Use a key for this client, or a key for all clients for account-wide routes.\n\n`PLAN_REQUIRED` — Your workspace plan does not permit API access. Upgrade your plan to enable API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`CLIENT_NOT_FOUND` — Client not found or not accessible to this workspace. Check the X-Client-Id header value.\n\n`MEDIA_NOT_FOUND` — Media asset not found in this brand. Check the assetId and the brand. Upload with POST /v1/media/uploads or POST /v1/media/import to get one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`RATE_LIMITED` — Too many requests. Slow down and retry after the Retry-After interval. Wait for the Retry-After header value before retrying.\n\n`MONTHLY_QUOTA_EXCEEDED` — Your monthly API call quota has been reached. Wait until the quota resets at the start of next month, or upgrade your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`UPSTREAM_UNAVAILABLE` — An upstream service is temporarily unavailable. Retry after the Retry-After interval. Retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get a media asset","tags":["Media"]}}},"info":{"title":"LuftSocial Developer API","description":"The LuftSocial Developer API publishes to connected channels.\n\nProduction: `https://platform.luftsocial.com`\nQA: `https://platform-qa.luftsocial.com`\nLocal: `http://localhost:3101`\n\nSend `Authorization: Bearer ls_sk_…`. Create keys in the developer console; the raw key is shown once, when you create it. Keys made before `ls_sk_` start with `ls_live_` and keep working.\n\nThere are no test keys: the networks have no sandbox, so every publish is real. Use `POST /v1/posts/preflight` to check a post without publishing.\n\nEach key has a permission. `read` can call every `GET` route and preflight, and cannot change anything; anything else returns `403 PERMISSION_REQUIRED`. `write` can do everything `read` can, plus every route that changes data.\n\nYour own accounts are on the `self` client. Each of your customers is a client you create with `POST /v1/clients`. Send `X-Client-Id` to act for one; without it a request uses the key's default client, else `self`.\n\nEach key is for all clients or for selected ones (`clientAccess`). A key for selected clients acts for those only (`403 CLIENT_NOT_ALLOWED` otherwise) and cannot call account-wide routes such as billing, webhooks, or the request log. A key can also expire (`401 API_KEY_EXPIRED`).\n\n## Connect an X account\n\nDo this once for the workspace. Posts go out through your X app.\n\n1. Open [developer.x.com](https://developer.x.com) and create an app, or open the app you already have.\n2. Open **User authentication settings** and choose **Set up**. Set the app type to **Web App**, so X gives you a client secret.\n3. Set the callback URL to the environment you connect from. It has to match exactly.\n   - Production: `https://luftsocial.com/dashboard/social`\n   - QA: `https://qa.luftsocial.com/dashboard/social`\n   Set the website URL to `https://luftsocial.com` or `https://qa.luftsocial.com`.\n4. Turn on `tweet.read`, `tweet.write`, `users.read`, `offline.access`, `media.write`, `dm.read`, and `dm.write`.\n5. Copy the OAuth 2.0 Client ID and Client Secret.\n6. `POST /v1/channels/x/credentials` with `appId` and `appSecret`. We ask X to accept them before anything is stored. If X rejects them, nothing is saved. The secret is encrypted and is not returned. Posting again with the same `appId` replaces the stored secret after a fresh verify (upsert). A different `appId` becomes the active app and deactivates the previous one: X accounts connected through the previous app must reconnect before they post again, and `affectedCount` in the response says how many (`affectedChannels` is the same number under its old name, deprecated).\n7. Connect the X account from the dashboard. X sends the person back to that callback URL.\n\n## Idempotency\n\n`POST /v1/posts` requires the `Idempotency-Key` header.\n\nGenerate the key before the call and send that same value if the call times out. Use a UUID v4 (`crypto.randomUUID()`) or your own order id. 1–255 characters, `[A-Za-z0-9_-]`.\n\nThe key is stored for that application for the life of the post. The same key and the same body return the original post and set `Idempotent-Replayed: true`. The same key with a different body is `409 IDEMPOTENCY_KEY_REUSED`. A key already used for a post on another client, or on a client this API key cannot use, is also `409 IDEMPOTENCY_KEY_REUSED`, whatever the body. A new key is a new post.\n\n`post.id` in the 202 is what you poll with `GET /v1/posts/{postId}`. It does not replace the header. If the 202 never arrived, you do not have `post.id`.\n\n## Errors\n\nEvery error uses the same body: `{ \"error\": { code, message, category, httpStatus, retryable, suggestedAction, requestId, docUrl, details } }`. `error.code` is stable and `error.httpStatus` equals the HTTP status. `error.details` holds facts about this failure, such as `errors: [{ field, message }]` for a validation failure; it is `{}` when there are none. `error.docUrl` points at `https://platform.luftsocial.com/errors/{code}`; [every code](/errors) has a page.\n\n## Postman\n\n[Import the collection](/postman/luftsocial.public.v1.collection.json). It is generated from this page. A route listed here is in the collection.","version":"1.0.0","contact":{}},"tags":[{"name":"Posts","description":"Preflight, publish, read, and cancel a post."},{"name":"Scheduler","description":"Posts queued for a future scheduledAt."},{"name":"Messaging","description":"Direct messages. Not available yet."},{"name":"Comments","description":"Comment moderation. Not available yet."},{"name":"Comments to DM","description":"Reply to a comment by DM. Not available yet."},{"name":"Analytics","description":"Post and channel metrics. Not available yet."},{"name":"Inbox","description":"Comments, DMs, and reviews in one feed. Not available yet."},{"name":"Channels","description":"Connected social accounts: list, connect, disconnect, and X app credentials."},{"name":"Webhooks","description":"Endpoints, secrets, and the delivery log."},{"name":"Billing","description":"Channel slots and the price of the next channel."},{"name":"Clients","description":"Your customers. Each client has its own channels, media, and posts. Your own accounts are on self."},{"name":"Applications","description":""},{"name":"Keys","description":"A raw key is returned once, at creation."},{"name":"Requests","description":"Call log for this workspace. Filter by time, status, activity, route, and client, or export CSV. Rows older than 30 days are deleted."},{"name":"Actions","description":"Audit log of key and channel changes."},{"name":"Issues","description":"Failed posts, exhausted webhooks, open incidents, and channels that need reconnect."},{"name":"Status","description":"Open platform incidents."}],"servers":[{"url":"https://platform.luftsocial.com","description":"Production"},{"url":"https://platform-qa.luftsocial.com","description":"QA"},{"url":"http://localhost:3101","description":"Local"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Keys start with ls_sk_ (older keys: ls_live_). Created in the developer console."}},"schemas":{"RequestLogEntryDto":{"type":"object","properties":{"id":{"type":"string","example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"method":{"type":"string","example":"POST"},"route":{"type":"string","example":"POST /v1/posts"},"httpStatus":{"type":"number","example":202},"errorCode":{"type":"string","nullable":true,"example":null},"durationMs":{"type":"number","example":42},"keyPrefix":{"type":"string","nullable":true,"example":"ls_sk_"},"clientId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"status":{"enum":["success","accepted","failed"],"type":"string","example":"accepted"},"activity":{"enum":["publishing","channels","webhooks","clients","other"],"type":"string","example":"publishing"}},"required":["id","method","route","httpStatus","errorCode","durationMs","keyPrefix","clientId","createdAt","status","activity"]},"RequestLogListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestLogEntryDto"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"CreateApplicationDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"PostPilot"}},"required":["name"]},"ApplicationResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"app_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"name":{"type":"string","example":"PostPilot","description":"Shown to customers on the hosted connect page."},"redirectUrls":{"example":["https://app.postpilot.io/connected"],"description":"Where hosted connect may send a customer back. Set in the developer console.","type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","redirectUrls","createdAt"]},"ApplicationListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","example":1}}}},"required":["data","meta"]},"ActionEntryDto":{"type":"object","properties":{"id":{"type":"string","example":"act_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"action":{"type":"string","example":"key.created"},"actor":{"type":"string","example":"ls_sk_"},"targetType":{"type":"string","nullable":true,"example":"api_key"},"targetId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","action","actor","targetType","targetId","createdAt"]},"ActionListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ActionEntryDto"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"ClientResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"cli_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"name":{"type":"string","example":"Ada Ltd"},"slug":{"type":"string","example":"ada"}},"required":["id","name","slug"]},"ClientsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","example":1}}}},"required":["data","meta"]},"CreateClientDto":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]*$","example":"ada","description":"Your id for this customer: lowercase letters, digits, - and _. Unique per account. self is reserved."},"displayName":{"type":"string","maxLength":200,"example":"Ada Ltd"}},"required":["slug"]},"CreateWebhookDto":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"example":"https://example.com/webhooks/luft"},"events":{"type":"array","items":{"type":"string","enum":["post.published","post.failed","platform.outage.opened","platform.outage.resolved","channel.connected","connect.failed","channel.reconnect_needed"]},"maxItems":50,"example":["post.published","post.failed"]}},"required":["url"]},"WebhookCreatedDto":{"type":"object","properties":{"id":{"type":"string","example":"whe_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"url":{"type":"string","example":"https://example.com/webhooks/luft"},"events":{"type":"array","example":["post.published"],"items":{"type":"string","enum":["post.published","post.failed","platform.outage.opened","platform.outage.resolved","channel.connected","connect.failed","channel.reconnect_needed"]}},"createdAt":{"type":"string","example":"2026-09-29T06:00:00.000Z"},"secret":{"type":"string","example":"whsec_example","description":"Shown once. Store it to verify X-Luft-Signature."}},"required":["id","url","events","createdAt","secret"]},"WebhookEndpointDto":{"type":"object","properties":{"id":{"type":"string","example":"whe_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"url":{"type":"string","example":"https://example.com/webhooks/luft"},"events":{"type":"array","example":["post.published"],"items":{"type":"string","enum":["post.published","post.failed","platform.outage.opened","platform.outage.resolved","channel.connected","connect.failed","channel.reconnect_needed"]}},"createdAt":{"type":"string","example":"2026-09-29T06:00:00.000Z"}},"required":["id","url","events","createdAt"]},"WebhookListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointDto"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"WebhookDeliveryDto":{"type":"object","properties":{"endpointId":{"type":"string","example":"whe_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"requestId":{"type":"string","nullable":true,"example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"eventType":{"type":"string","example":"post.failed"},"attempt":{"type":"number","example":3},"responseStatus":{"type":"number","nullable":true,"example":500},"errorCode":{"type":"string","nullable":true,"example":"WEBHOOK_DELIVERY_FAILED"},"createdAt":{"type":"string","example":"2026-09-29T06:00:00.000Z"}},"required":["endpointId","requestId","eventType","attempt","responseStatus","errorCode","createdAt"]},"WebhookDeliveryListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryDto"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"PostDestinationDto":{"type":"object","properties":{"channelId":{"type":"string","example":"ch_instagram","description":"Channel id from GET /v1/channels."},"postType":{"enum":["IMAGE","VIDEO","REELS","STORIES","SHORTS","TEXT","CAROUSEL","DOCUMENT"],"type":"string","example":"REELS","description":"Post type for this channel. YouTube Shorts use SHORTS. YouTube Live is not accepted."},"caption":{"type":"string","maxLength":63206,"example":"Launch day on Facebook","description":"Caption for this channel. Falls back to the top-level caption when omitted."},"title":{"type":"string","maxLength":2200,"example":"Launch day short","description":"Required for YouTube. Ignored by networks that have no title."},"mediaAssetIds":{"example":["asset_reel_video"],"description":"Media for this channel. A Reel and a photo do not share a list. Set this on every destination.","maxItems":35,"type":"array","items":{"type":"string"}},"platformSpecificParams":{"type":"object","additionalProperties":true,"example":{"published":true},"description":"Fields that belong only to this network. Text in caption and description is at most 63206 characters; title, documentTitle and articleTitle at most 2200."}},"required":["channelId"]},"CreatePostDto":{"type":"object","properties":{"caption":{"type":"string","maxLength":63206,"example":"Launch day","description":"Caption used when a destination does not set its own."},"title":{"type":"string","maxLength":2200,"example":"Launch day"},"destinations":{"minItems":1,"uniqueItems":true,"example":[{"channelId":"ch_instagram","postType":"REELS","mediaAssetIds":["asset_reel_video"]},{"channelId":"ch_facebook","postType":"IMAGE","caption":"Launch day on Facebook","mediaAssetIds":["asset_facebook_photo"]},{"channelId":"ch_youtube","postType":"SHORTS","title":"Launch day short","mediaAssetIds":["asset_youtube_short"]}],"maxItems":200,"description":"One per channel, at most 200. A channelId may appear once.","type":"array","items":{"$ref":"#/components/schemas/PostDestinationDto"}},"mediaAssetIds":{"description":"Fallback media for a destination that omits mediaAssetIds. Prefer media on each destination.","maxItems":35,"type":"array","items":{"type":"string"}},"scheduledAt":{"type":"string","format":"date-time","example":"2026-09-28T18:00:00.000Z","description":"Schedule time. Must be in the future. Omit to publish now."}},"required":["destinations"]},"MediaIssueAutoFix":{"type":"object","properties":{"action":{"type":"string","example":"resize_to_fit","description":"What we do to the file before sending it, e.g. convert_to_jpeg, resize_to_fit."}},"required":["action"]},"MediaIssue":{"type":"object","properties":{"code":{"type":"string","example":"MEDIA_RESIZED","description":"Stable code. Branch on code + severity, never on message. See docUrl."},"severity":{"enum":["error","warning","info"],"type":"string","example":"info","description":"error: the network rejects it, the post will fail. warning: it posts but may be cropped, scaled or degraded. info: we change the file (see autoFix); it posts."},"field":{"type":"string","example":"dimensions"},"message":{"type":"string","example":"We'll resize this photo to fit TikTok's 1080p limit."},"actual":{"type":"object","description":"What the file has, e.g. { width: 4032, height: 3024 }."},"limit":{"type":"object","description":"The limit it was checked against."},"autoFix":{"$ref":"#/components/schemas/MediaIssueAutoFix"},"docUrl":{"type":"string","example":"https://platform.luftsocial.com/media-issues/MEDIA_RESIZED"}},"required":["code","severity","field","message","docUrl"]},"PreflightDestination":{"type":"object","properties":{"channelId":{"type":"string","example":"ch_01J9ZK3P"},"platform":{"type":"string","example":"tiktok"},"postType":{"type":"string","example":"IMAGE","description":"The post type the network will receive for this media."},"issues":{"description":"Media findings for this destination. Empty when clean.","type":"array","items":{"$ref":"#/components/schemas/MediaIssue"}}},"required":["channelId","platform","postType","issues"]},"PreflightResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":true,"description":"false only when a destination has an error issue. warning and info issues still publish."},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/PreflightDestination"}}},"required":["ok","destinations"]},"PostAccepted":{"type":"object","properties":{"id":{"type":"string","example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"status":{"enum":["queued","scheduled","publishing","published","partially_published","failed","cancelled"],"type":"string","example":"queued","description":"queued: accepted, not yet sent to the network. scheduled: waiting for scheduledAt. publishing: sent, the network has not confirmed yet. published, partially_published, failed, cancelled: final."},"requestId":{"type":"string","example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"}},"required":["id","status","requestId"]},"AcceptedPostResponse":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/PostAccepted"}},"required":["post"]},"PostDestinationResult":{"type":"object","properties":{"channelId":{"type":"string","example":"ch_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"platform":{"type":"string","nullable":true,"example":"instagram"},"status":{"enum":["pending","published","failed","cancelled","unknown","not_attempted"],"type":"string","example":"published","description":"pending until the post is final. Then published or failed per network, cancelled with the post, unknown when the network did not report this destination, or not_attempted when another destination stopped the post before anything was sent (that destination is failed and says why)."},"errorCode":{"type":"string","nullable":true,"example":null,"description":"Catalog code. Null unless status is failed."},"errorMessage":{"type":"string","nullable":true,"example":null,"description":"Why this destination failed, when the network said. Null unless status is failed."},"publishedAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-09-28T18:00:05.000Z","description":"When the network confirmed this destination. Null unless published."}},"required":["channelId","platform","status","errorCode","errorMessage","publishedAt"]},"PostView":{"type":"object","properties":{"id":{"type":"string","example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"status":{"enum":["queued","scheduled","publishing","published","partially_published","failed","cancelled"],"type":"string","example":"queued","description":"queued: accepted, not yet sent to the network. scheduled: waiting for scheduledAt. publishing: sent, the network has not confirmed yet. published, partially_published, failed, cancelled: final."},"requestId":{"type":"string","example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"publishId":{"type":"string","nullable":true,"example":"pub_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"errorCode":{"type":"string","nullable":true,"example":null},"errorMessage":{"type":"string","nullable":true,"example":null,"description":"Why the post failed, when we know: for example \"Platform instagram does not support text-only posts. At least one media item is required.\" Null unless status is failed."},"scheduledAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-09-28T18:00:00.000Z"},"publishedAt":{"type":"string","nullable":true,"format":"date-time","example":null,"description":"When the network confirmed the post. Set once published."},"destinations":{"description":"One entry per destination, in the order sent. A partially_published post says here which destinations failed and why; its post-level errorCode and errorMessage stay null.","type":"array","items":{"$ref":"#/components/schemas/PostDestinationResult"}}},"required":["id","status","requestId","publishId","errorCode","errorMessage","scheduledAt","publishedAt","destinations"]},"PostListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PostView"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ","description":"Send as cursor for the next page; null on the last."},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"PostResponse":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/PostView"}},"required":["post"]},"UpdatePostDto":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time","example":"2026-09-29T18:00:00.000Z","description":"New schedule time. Must be in the future."},"caption":{"type":"string","maxLength":63206,"example":"Launch day, moved to Tuesday","description":"New caption for destinations that do not set their own."}}},"PlatformStatusItemDto":{"type":"object","properties":{"id":{"type":"string","example":"inc_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"platform":{"type":"string","example":"facebook"},"message":{"type":"string","example":"facebook is failing repeatedly."},"startedAt":{"type":"string","example":"2026-09-29T06:00:00.000Z"},"hardDown":{"type":"boolean","example":false,"description":"When true, new publishes to this network are rejected with PLATFORM_OUTAGE."}},"required":["id","platform","message","startedAt","hardDown"]},"PlatformStatusResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlatformStatusItemDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","example":1}}}},"required":["data","meta"]},"ScheduledPostDto":{"type":"object","properties":{"id":{"type":"string","example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"platform":{"type":"string","example":"instagram","description":"Platform of the first destination."},"contentPreview":{"type":"string","example":"Launch day. Link in bio.","description":"First 120 characters of the caption."},"scheduledAt":{"type":"string","example":"2026-10-14T09:00:00.000Z"},"status":{"enum":["queued","scheduled"],"type":"string","example":"scheduled","description":"queued: not yet handed to the network. scheduled: held until scheduledAt."}},"required":["id","platform","scheduledAt","status"]},"ScheduledPostListMetaDto":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":50}},"required":["cursor","limit"]},"ScheduledPostListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledPostDto"}},"meta":{"$ref":"#/components/schemas/ScheduledPostListMetaDto"}},"required":["data","meta"]},"IssueDto":{"type":"object","properties":{"kind":{"enum":["post_failed","webhook_failing","platform_outage","channel_reconnect"],"type":"string","example":"post_failed"},"id":{"type":"string","example":"post_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"requestId":{"type":"string","nullable":true,"example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"code":{"type":"string","nullable":true,"example":"PUBLISH_FAILED"},"message":{"type":"string","nullable":true,"example":"Platform instagram does not support text-only posts. At least one media item is required.","description":"Why a post failed, when we know. Set on post_failed only."},"openedAt":{"type":"string","example":"2026-09-29T06:00:00.000Z"}},"required":["kind","id","requestId","code","openedAt"]},"IssueListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IssueDto"}},"meta":{"type":"object","properties":{"cursor":{"type":"string","nullable":true,"example":null},"limit":{"type":"number","example":20}}}},"required":["data","meta"]},"ChannelResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"ch_instagram"},"name":{"type":"string","example":"Ada Instagram"},"platform":{"type":"string","example":"instagram","description":"X is returned as x."},"clientId":{"type":"string","example":"cli_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"billable":{"type":"boolean","example":true},"connectionStatus":{"type":"string","example":"connected","description":"connected, needs_reconnection or plan_locked. On needs_reconnection, ask for a link with this channelId."},"reconnectReason":{"nullable":true,"enum":["x_app_replaced","token"],"type":"string","example":null,"description":"Why the channel needs reconnecting: x_app_replaced (the workspace replaced its X app; reconnect through the current one) or token (the network no longer accepts its token). Null when it is connected or the reason is unknown."}},"required":["id","name","platform","clientId","billable","connectionStatus","reconnectReason"]},"ChannelsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","example":1}}}},"required":["data","meta"]},"StartConnectDto":{"type":"object","properties":{"redirectUrl":{"type":"string","maxLength":2000,"format":"uri","example":"https://app.postpilot.io/connected","description":"Where the customer goes when they finish. Must exactly match one of the application’s redirect URLs. Omit to show a done page."},"channelId":{"type":"string","example":"ch_instagram","description":"Reconnect this channel instead of adding one. The customer must approve the same account."}}},"ConnectLinkDto":{"type":"object","properties":{"url":{"type":"string","example":"https://luftsocial.com/connect/2Yx…","description":"Send your customer here. Single use, and stops working at expiresAt."},"sessionId":{"type":"string","format":"uuid","example":"9a1f0c2e-5b7d-4e8a-9c3f-1d2e3f4a5b6c"},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","sessionId","expiresAt"]},"CreateXCredentialDto":{"type":"object","properties":{"appId":{"type":"string","minLength":1,"maxLength":200,"example":"1234567890","description":"X app id. Not a secret."},"appSecret":{"type":"string","minLength":1,"maxLength":2000,"example":"your-x-app-secret","description":"X app secret. Stored encrypted. Never returned and never logged."},"confirmReplace":{"type":"boolean","example":true,"description":"Set to true to confirm replacing your current X app with a different one. X channels connected through the current app must reconnect before they publish again. Only checked when replacement confirmation is enforced for the workspace; see 409 X_APP_REPLACEMENT_UNCONFIRMED."}},"required":["appId","appSecret"]},"XCredentialResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"xcr_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"appId":{"type":"string","example":"1234567890"},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"isActive":{"type":"boolean","example":true},"affectedCount":{"type":"number","nullable":true,"example":0,"description":"How many X channels this store marked as needing reconnect: those connected through the X app it replaced. 0 for a first store or a secret rotation of the same app. Null when not reported."},"affectedChannels":{"type":"number","nullable":true,"example":0,"deprecated":true,"description":"Deprecated: the same number as affectedCount, under its old name. Read affectedCount."}},"required":["id","appId","verifiedAt","isActive","affectedCount","affectedChannels"]},"ChannelBoardDto":{"type":"object","properties":{"boardId":{"type":"string","example":"1029384756","description":"Send as platformSpecificParams.boardId."},"name":{"type":"string","example":"Recipes"},"privacy":{"type":"string","nullable":true,"example":"PUBLIC"}},"required":["boardId","name","privacy"]},"ChannelBoardsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelBoardDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","example":1}}}},"required":["data","meta"]},"ConnectSessionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"9a1f0c2e-5b7d-4e8a-9c3f-1d2e3f4a5b6c"},"status":{"enum":["pending","started","completed","failed","expired"],"type":"string","description":"pending: link not opened yet. started: the customer is on the network. completed, failed, expired: final."},"platform":{"type":"string","example":"instagram"},"clientId":{"type":"string","example":"cli_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"channelId":{"type":"string","nullable":true,"example":"ch_instagram"},"errorCode":{"type":"string","nullable":true,"example":null,"description":"When failed: denied, expired, SLOT_LIMIT_REACHED, ACCOUNT_ALREADY_CONNECTED, ACCOUNT_ON_ANOTHER_CLIENT (the account is already connected for another of your clients), RECONNECT_ACCOUNT_MISMATCH, INSTAGRAM_NO_PAGE (the Instagram account is not a professional account linked to a Facebook Page, or the Page was not shared), X_RATE_LIMITED (X is limiting requests; send a new link in a few minutes), X_OAUTH_CLIENT_CHANGED (your X app changed during the connect; start a new link) or provider_error."},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","status","platform","clientId","channelId","errorCode","expiresAt","createdAt","completedAt"]},"CreateMediaUploadDto":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"example":"launch-reel.mp4"},"mimeType":{"type":"string","pattern":"^(image\\/[a-z0-9.+-]+|video\\/[a-z0-9.+-]+|application\\/pdf)$","example":"video/mp4","description":"image/*, video/*, or application/pdf (LinkedIn documents)."},"fileSize":{"type":"number","minimum":1,"maximum":1073741824,"example":18874368,"description":"Exact size in bytes. The upload URL only accepts a file of this size."},"fileHash":{"type":"string","pattern":"^[a-f0-9]{64}$","example":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","description":"SHA-256 of the file, hex. When the client already has the same file, the response is status ready and you skip the upload."}},"required":["fileName","mimeType","fileSize"]},"MediaUploadView":{"type":"object","properties":{"assetId":{"type":"string","example":"6f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2","description":"Use it in mediaAssetIds once status is ready."},"status":{"enum":["pending","ready"],"type":"string","example":"pending","description":"pending: PUT the file to uploadUrl, then call complete. ready: the client already has this file; use assetId now."},"uploadUrl":{"type":"string","nullable":true,"example":"https://media.luftsocial.com/…?X-Amz-Signature=…","description":"Presigned URL. Send one PUT with the file as the body."},"uploadHeaders":{"type":"object","additionalProperties":{"type":"string"},"nullable":true,"example":{"content-type":"video/mp4","x-amz-meta-cdnurl":"https://cdn.luftsocial.com/…"},"description":"Send these headers on the PUT, exactly as given."},"expiresAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-10-20T13:00:00.000Z","description":"uploadUrl stops working at this time. Resend the same request with the same Idempotency-Key for a fresh one."}},"required":["assetId","status","uploadUrl","uploadHeaders","expiresAt"]},"MediaUploadResponse":{"type":"object","properties":{"media":{"$ref":"#/components/schemas/MediaUploadView"}},"required":["media"]},"MediaView":{"type":"object","properties":{"assetId":{"type":"string","example":"6f1c2a90-7b14-4e2a-9c31-0a6e8d4b91f2"},"status":{"enum":["pending","ready"],"type":"string","example":"ready"},"fileName":{"type":"string","example":"launch-reel.mp4"},"mimeType":{"type":"string","example":"video/mp4"},"fileSize":{"type":"number","example":18874368},"url":{"type":"string","nullable":true,"example":"https://cdn.luftsocial.com/social-media/…/launch-reel.mp4","description":"Where the file is served from. Null while pending."},"createdAt":{"type":"string","format":"date-time","example":"2026-10-20T12:00:00.000Z"}},"required":["assetId","status","fileName","mimeType","fileSize","url","createdAt"]},"MediaResponse":{"type":"object","properties":{"media":{"$ref":"#/components/schemas/MediaView"}},"required":["media"]},"ImportMediaDto":{"type":"object","properties":{"sourceUrl":{"type":"string","maxLength":2048,"format":"uri","example":"https://cdn.example.com/launch-reel.mp4","description":"Public HTTPS URL of an image or video. Private and internal addresses are refused."}},"required":["sourceUrl"]},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","category","httpStatus","retryable","suggestedAction","requestId","docUrl","details"],"properties":{"code":{"type":"string","example":"IDEMPOTENCY_KEY_REUSED"},"message":{"type":"string"},"category":{"type":"string","enum":["AUTHENTICATION","PERMISSION","VALIDATION","CONFLICT","NOT_FOUND","PLAN","RATE_LIMIT","UPSTREAM","INTERNAL"],"example":"CONFLICT"},"httpStatus":{"type":"integer","example":409},"retryable":{"type":"boolean","example":false},"suggestedAction":{"type":"string"},"requestId":{"type":"string","example":"req_01J0A2B3C4D5E6F7G8H9JKMNPQ"},"docUrl":{"type":"string","example":"https://platform.luftsocial.com/errors/IDEMPOTENCY_KEY_REUSED"},"details":{"type":"object","additionalProperties":true,"description":"Facts about this failure, such as the field that failed validation. Empty when there are none."}}}}}}},"security":[{"bearer":[]}],"x-tagGroups":[{"name":"Publishing","tags":["Posts","Media","Scheduler"]},{"name":"Channels","tags":["Channels","Webhooks"]},{"name":"Workspace","tags":["Clients","Applications","Billing"]},{"name":"Monitoring","tags":["Requests","Actions","Issues","Status"]}]}