{"info":{"title":"Endless API","summary":"REST API for the Endless platform.","description":"The Endless REST API. Guides and per-endpoint pages: https://endless.app/docs/api\n\n## Authentication\n\nEvery operation takes a Clerk-issued JWT as `Authorization: Bearer <token>`. There is no unauthenticated surface.\n\n## Errors\n\nEvery failure — including a path that matches no route — returns `application/json` in one shape:\n\n```json\n{\n  \"code\": \"FORBIDDEN\",\n  \"status\": 403,\n  \"message\": \"Your role does not have permission to do this\",\n  \"data\": { \"code\": \"permission_denied\", \"hint\": \"…\", \"documentation\": \"…\" }\n}\n```\n\n`code` is the symbolic HTTP status and `data.code` the specific reason — branch on `data.code`, never on `message`, which is written for a person and may be reworded. The `Error` schema lists every `data.code` the API can raise.\n\n## Versioning\n\nThe current version is **1.0.0**. The URL carries no version segment: send `Endless-Api-Version: 1` to pin yourself to a major, or omit the header to accept the current one. A major this deployment cannot serve is refused with 400 `unsupported_api_version` rather than answered in a shape you are not expecting.\n\nWithin a major, changes are additive only — new operations, new optional inputs, new response fields. Anything that removes or retypes an existing field is a new major. Treat unknown response fields as forward compatibility, not as an error.\n\n## Deprecation\n\nAn operation on its way out answers with `Deprecation` (RFC 9745) and `Sunset` (RFC 8594) headers, plus a `Link` with `rel=\"deprecation\"` pointing at the migration note, and is marked `deprecated: true` here. It keeps working for at least 180 days after that first header ships. The full versioning and deprecation policy: https://endless.app/docs/reference/api-versioning\n\n## Rate limits\n\nThe published policy is **1000 requests per 60s** per caller, named `default`. Every response — success and failure alike — carries `RateLimit` and `RateLimit-Policy` (draft-ietf-httpapi-ratelimit-headers) as well as the older `RateLimit-Limit` / `RateLimit-Remaining` / `RateLimit-Reset` triple, so a client can pace itself before it is refused. A 429 adds `Retry-After`, in seconds.\n\nA workspace API key (`esk_…`) is limited per key instead: **50 requests per 60s**, named `api_key`, shared by every secret of the key, so rotating it does not reset the window.\n","version":"1.0.0","termsOfService":"https://endless.app/legal/terms-of-service","contact":{"name":"Endless Support","email":"support@endless.app","url":"https://endless.app"}},"servers":[{"url":"https://api.endless.app"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Clerk session JWT, or a workspace API key (`esk_live_…`) created in workspace settings. A key acts as the member who created it, narrowed to its abilities, projects and credit limit."}},"schemas":{"Error":{"type":"object","title":"Error","description":"The shape of every failure this API returns, whatever the status.","required":["code","status","message"],"properties":{"code":{"type":"string","description":"Symbolic form of the HTTP status. Stable, and safe to branch on.","enum":["BAD_REQUEST","UNAUTHORIZED","PAYMENT_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","TOO_MANY_REQUESTS","INTERNAL_SERVER_ERROR"]},"status":{"type":"integer","description":"The HTTP status, repeated in the body."},"message":{"type":"string","description":"A human-readable explanation. Written for a person; do not branch on it."},"defined":{"type":"boolean","description":"True when the failure is one the operation's contract declares, so its `data` is part of the documented shape. False for a generic failure."},"data":{"type":"object","description":"Machine-readable detail. `code` is the reason to branch on; some errors add their own fields (e.g. `issues` on a validation failure).","properties":{"code":{"type":"string","description":"The specific reason, in snake_case. This is the field to branch on.","enum":["access_resource_unsupported","adjustment_preview_required","admin_required","admin_transfer_required","already_invited","already_member","already_team_member","amount_required","api_key_creator_only","api_key_expiry_in_past","api_key_not_found","api_key_project_invalid","api_key_project_required","api_key_project_scope_unsupported","api_key_projects_required","api_key_revoked","api_key_scope_denied","api_key_scope_not_grantable","api_key_secret_current","api_key_secret_not_found","asset_not_extractable","asset_not_found","asset_restore_conflict","asset_unmeasured","audio_too_large","backdated_change_superseded","bearer_token_required","billing_emails_must_be_array","brand_source_unreadable","bucket_changed","bucket_expiry_governed_by_cycle","bucket_not_live","cannot_demote_last_admin","cannot_grant_owner","cannot_invite_self","cannot_leave_last_admin","cannot_leave_last_member","cannot_remove_last_admin","cannot_remove_self","canvas_name_required","canvas_not_found","card_charge_failed","card_conflicts_out_of_band","change_scheduled_by_staff","chat_message_not_found","chat_model_codename_taken","chat_model_not_found","chat_model_variant_binding_taken","chat_model_variant_not_found","chat_not_found","chat_run_stopped","checkout_session_failed","clerk_error","clerk_rejected","clerk_sync_timeout","conflicting_file_input","contract_amount_underivable","contract_change_applies_now","contract_unpriced","cost_alert_not_found","credit_purchase_plan_too_low","credit_purchase_too_large","credit_purchase_too_small","credit_purchase_unavailable","credit_rate_underivable","current_period_end_not_found","current_price_not_found","customer_email_required","customer_not_found","customer_required","data_migration_conflict","data_migration_failed","data_migration_list_failed","data_migration_preview_failed","data_migration_status_failed","database_update_failed","default_card_required","default_variant_cannot_disable","default_variant_required","destination_not_found","destination_not_linked","destination_required_without_members","document_not_found","document_too_large","document_truncated","domain_not_found","drive_folder_link","drive_not_shared","drive_quota_exceeded","drive_unreadable","dual_clerk_not_configured","dual_database_not_configured","dual_storage_not_configured","dual_workspace_not_found","email_address_not_found","email_recipients_required","email_required","empty_transcript","end_date_applies_now","end_date_requires_zero_plan","exceeds_api_key_spending_limit","exceeds_spending_limit","expiry_before_effective","feature_not_enabled","feature_price_not_found","file_too_large","forbidden","free_benefit_exemption_exists","free_benefit_exemption_not_found","gateway_model_not_found","generation_cost_unknown","generation_failed","generation_model_unavailable","generation_not_found","grant_not_found","identity_provider_unavailable","import_fetch_failed","import_too_large","import_unsupported_type","import_url_not_allowed","insufficient_credits","invalid_admin_transfer","invalid_alert_thresholds","invalid_amount","invalid_asset_input","invalid_billing_email","invalid_cadence","invalid_chat_model_pricing","invalid_chat_model_thinking_options","invalid_cursor","invalid_date","invalid_email","invalid_empty_finalization","invalid_file_type","invalid_generation_parameters","invalid_knowledge_box","invalid_match_rule","invalid_member_ids","invalid_model_mapper","invalid_model_parameters","invalid_parent_message","invalid_props_overlay","invalid_quick_action_schema","invalid_teams","invalid_timezone","invalid_token","invitation_expired","invitation_not_found","invitation_not_pending","invoice_finalize_failed","invoice_not_draft","invoice_not_found","invoice_not_payable","invoice_payment_failed","knowledge_skill_link","knowledge_skill_not_linkable","knowledge_skill_protected","last_enabled_variant","limit_requires_postpaid","mapper_draft_failed","mapper_proof_failed","media_model_draft_exists","media_model_not_found","media_model_publish_blocked","media_model_variant_not_found","media_model_variant_provider_required","media_model_version_current_locked","media_model_version_matches_disabled","media_model_version_not_draft","media_model_version_not_found","media_model_version_retired","media_model_version_transition_invalid","media_model_version_unchanged","member_not_found","members_required_for_mod","migration_already_running","missing_required_fields","missing_token","mod_database_not_configured","model_codename_taken","model_disabled","model_not_found","model_plan_required","name_required","new_price_not_found","no_backdated_change","no_changes","no_resolvable_owner","no_scheduled_change","no_subscription","not_a_custom_plan","not_found","not_member","not_team_member","nothing_changed","notification_not_found","organization_creation_failed","organization_not_found","organization_required","out_of_band_requires_contract","overrides_require_negotiated","permission_denied","plan_not_self_serve","planned_cycle_not_found","planned_cycle_refused","portal_session_failed","postpaid_account_missing","postpaid_plan_stale","postpaid_window_not_found","price_archived","price_edit_failed","price_id_required","price_inactive","price_not_credit_pack","price_not_found","primary_email_removal_refused","project_limit_reached","project_not_found","project_title_required","prompt_extract_failed","provider_endpoint_not_found","provider_import_failed","provider_input_invalid","provider_model_not_found","provider_url_unrecognized","quick_action_codename_taken","quick_action_not_found","quote_exceeds_max_credits","report_filter_unsupported","report_group_by_unsupported","report_no_billing_cycle","report_single_organization_required","report_timezone_unknown","reserved_workspace_slug","retroactive_requires_contract","retroactive_requires_same_cadence","retroactive_window_not_found","role_locked","run_not_found","same_plan","schedule_date_passed","scheduled_change_pending","scheduled_task_not_found","scheduled_task_run_not_found","search_input_invalid","search_not_configured","search_request_failed","seat_limit_reached","session_not_found","skill_body_too_large","skill_copy_exists","skill_listing_current","skill_listing_modified","skill_listing_not_found","skill_listing_slug_taken","skill_modified","slug_match_needs_confirmation","social_input_invalid","social_not_found","social_private","social_request_failed","source_refused","source_unavailable","source_unreadable","staff_domain_refused","staff_email_required","staff_invitee_refused","staff_permission_required","staff_required","staff_self_action_refused","storage_misconfigured","stripe_customer_creation_failed","stripe_customer_update_failed","subscription_already_exists","subscription_creation_failed","subscription_is_contract","subscription_item_not_found","subscription_not_contract","subscription_not_found","subscription_not_trialing","subscription_retrieval_failed","subscription_scheduled","subscription_update_failed","support_account_limit","support_action_unauthorized","support_credit_cycle_limit","support_credit_cycle_unavailable","support_future_window","support_query_rejected","support_snapshot_drift","support_window_too_large","tax_id_invalid","tax_id_not_found","team_name_required","team_not_found","transaction_not_a_bucket","transaction_not_found","transcript_asset_link_invalid","transcript_asset_unavailable","transcript_language_switch_unsupported","transcript_not_found","transcript_source_conflict","transcript_source_required","transcript_unavailable","transcription_aborted","transcription_failed","transcription_invalid_response","transcription_rate_limited","transcription_still_processing","transcription_unavailable","trial_end_applies_now","unsupported_mime_type","upload_not_pending","upload_object_missing","usage_account_customer_in_use","usage_account_customer_not_found","usage_account_ended","usage_account_has_live_workspaces","usage_account_not_found","usage_account_workspace_already_on","usage_account_workspace_not_on","usage_account_workspace_paid","usage_product_not_configured","user_already_in_another_team","user_not_found","user_not_in_org","user_required","vertex_model_not_found","video_analysis_length_unknown","video_analysis_not_video","video_analysis_source_unsupported","video_analysis_too_large","video_analysis_unavailable","voice_design_failed","voice_model_not_trainable","voice_not_found","voice_quota_reached","voice_training_failed","voice_training_unavailable","workspace_slug_taken","would_leave_without_admin","yearly_plan_change_not_allowed","invalid_path_parameter","rate_limited","route_not_found","unsupported_api_version"]},"hint":{"type":"string","description":"What to change to make the request succeed."},"documentation":{"type":"string","format":"uri","description":"Where to read more about this operation."}}}}}},"parameters":{"EndlessApiVersion":{"name":"Endless-Api-Version","in":"header","required":false,"description":"Pin the caller to an API major (`1`). Omit to accept the current version. A major this deployment cannot serve is refused with 400 `unsupported_api_version`.","schema":{"type":"string","example":"1"}}}},"openapi":"3.2.0","paths":{"/users/{user_id}":{"get":{"operationId":"users.get","summary":"Get user","description":"Returns a single user. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","emails","first_name","last_name","image_url","username","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"users.update","summary":"Update user","description":"Updates an user and returns the updated row. Scoped to the user named by `user_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","email","emails","first_name","last_name","image_url","username","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"users.delete","summary":"Delete user","description":"Deletes an user. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"admin_transfers":{"type":"array","items":{"type":"object","properties":{"organization_id":{"type":"string"},"new_admin_user_id":{"type":"string"}},"required":["organization_id","new_admin_user_id"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{user_id}/image":{"put":{"operationId":"users.image.update","summary":"Update user image","description":"Updates an user image and returns the updated row. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["file"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"emails":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"public_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"private_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"unsafe_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"preferred_language":{"anyOf":[{"enum":["en","es","pt"],"type":"string"},{"type":"null"}]},"known_languages":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"preferred_time_zone":{"anyOf":[{"type":"string"},{"type":"null"}]},"known_time_zones":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"mod_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_contact_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","email","emails","first_name","last_name","image_url","username","public_metadata","private_metadata","unsafe_metadata","preferred_language","known_languages","preferred_time_zone","known_time_zones","mod_user_id","dual_user_id","intercom_contact_id","deleted_at","created_at","updated_at","clerk_updated_at"]}},"required":["success","user"]},{"type":"object","properties":{"success":{"const":false},"error":{"const":"not_found"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"users.image.remove","summary":"Remove user image","description":"Deletes an user image. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"emails":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"public_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"private_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"unsafe_metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"preferred_language":{"anyOf":[{"enum":["en","es","pt"],"type":"string"},{"type":"null"}]},"known_languages":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"preferred_time_zone":{"anyOf":[{"type":"string"},{"type":"null"}]},"known_time_zones":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"mod_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_contact_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","email","emails","first_name","last_name","image_url","username","public_metadata","private_metadata","unsafe_metadata","preferred_language","known_languages","preferred_time_zone","known_time_zones","mod_user_id","dual_user_id","intercom_contact_id","deleted_at","created_at","updated_at","clerk_updated_at"]}},"required":["success","user"]},{"type":"object","properties":{"success":{"const":false},"error":{"const":"not_found"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{user_id}/memberships":{"get":{"operationId":"users.memberships","summary":"List user memberships","description":"List user memberships. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","image_url"]},"member_count":{"type":"number"},"other_members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}}},"required":["role","organization","member_count","other_members"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{user_id}/teams":{"get":{"operationId":"users.teams","summary":"List user teams","description":"List user teams. Scoped to the user named by `user_id`.","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"name":"organization_id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","description","color","icon_url","spending_limit","created_at"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/logo":{"put":{"operationId":"organization_logo.update","summary":"Update organization logo","description":"Updates an organization logo and returns the updated row. Scoped to the organization named by `organization_id`.","tags":["Organization logo"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["file"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"max_allowed_voices":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_company_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","slug","image_url","max_allowed_memberships","max_allowed_voices","stripe_customer_id","stripe_subscription_id","created_by_id","mod_organization_id","dual_organization_id","intercom_company_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","deleted_at","deleted_by_id","created_at","updated_at","clerk_updated_at"]}},"required":["success","organization"]},{"type":"object","properties":{"success":{"const":false},"error":{"enum":["not_found","clerk_error","database_error"],"type":"string"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"organization_logo.remove","summary":"Remove organization logo","description":"Deletes an organization logo. Scoped to the organization named by `organization_id`.","tags":["Organization logo"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"const":true},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"max_allowed_voices":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"intercom_company_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"clerk_updated_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","slug","image_url","max_allowed_memberships","max_allowed_voices","stripe_customer_id","stripe_subscription_id","created_by_id","mod_organization_id","dual_organization_id","intercom_company_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","deleted_at","deleted_by_id","created_at","updated_at","clerk_updated_at"]}},"required":["success","organization"]},{"type":"object","properties":{"success":{"const":false},"error":{"const":"not_found"}},"required":["success","error"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}":{"get":{"operationId":"organizations.get","summary":"Get organization","description":"Returns a single organization. Scoped to the organization named by `organization_id`.","tags":["Organizations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","slug","image_url","max_allowed_memberships","stripe_customer_id","stripe_subscription_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"organizations.update","summary":"Update organization","description":"Updates an organization and returns the updated row. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Organizations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_allowed_memberships":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_mod_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"migrated_from_dual_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","slug","image_url","max_allowed_memberships","stripe_customer_id","stripe_subscription_id","onboarded_at","migrated_from_mod_at","migrated_from_dual_at","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"organizations.delete","summary":"Delete organization","description":"Deletes an organization. Scoped to the organization named by `organization_id`.","tags":["Organizations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations":{"post":{"operationId":"organizations.create","summary":"Create organization","description":"Creates an organization and returns the created row.","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"logo_domain":{"type":"string","maxLength":255},"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["name","slug"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"logo_domain":{"type":"string","maxLength":255},"file":{"anyOf":[{"type":"string","contentMediaType":"image/png"},{"type":"string","contentMediaType":"image/jpeg"},{"type":"string","contentMediaType":"image/gif"},{"type":"string","contentMediaType":"image/webp"}]}},"required":["name","slug"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/teams":{"get":{"operationId":"teams.list","summary":"List teams","description":"Lists the teams the caller can read.","tags":["Teams"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_count":{"type":"number"},"member_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id","member_count","member_previews"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"teams.create","summary":"Create team","description":"Creates a team and returns the created row.","tags":["Teams"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"member_ids":{"type":"array","maxItems":100,"items":{"type":"string"}}},"required":["organization_id","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id"]},"memberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","team_id","user_id","organization_id","created_at"]}}},"required":["team","memberships"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/teams/{team_id}":{"get":{"operationId":"teams.get","summary":"Get team","description":"Returns a single team. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"teams.update","summary":"Update team","description":"Updates a team and returns the updated row. Scoped to the team named by `team_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"dual_team_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organization_id","name","description","color","icon_url","spending_limit","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","dual_team_id"]}},"required":["team"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"teams.delete","summary":"Delete team","description":"Deletes a team. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/{team_id}/credits":{"get":{"operationId":"teams.credits","summary":"Get team credits","description":"Get team credits. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"team_used":{"type":"number"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"spending_limit_remaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["team_used","spending_limit","spending_limit_remaining","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/{team_id}/members":{"get":{"operationId":"teams.members.list","summary":"List team members","description":"Lists the team members the caller can read. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","team_id","user_id","organization_id","created_at","user"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"teams.members.add","summary":"Add team member","description":"Add team member. Scoped to the team named by `team_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"}},"required":["user_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"membership":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","team_id","user_id","organization_id","created_at"]}},"required":["membership"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/{team_id}/members/{user_id}":{"delete":{"operationId":"teams.members.remove","summary":"Remove team member","description":"Deletes a team member. Scoped to the team named by `team_id`, and the user named by `user_id`.","tags":["Teams"],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-1c40-7b3a-8f21-6d0c2a91f4e7"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys":{"get":{"operationId":"api_keys.list","summary":"List API keys","description":"Every API key of the workspace, revoked and expired ones included, newest first. Never returns a key's secret.","tags":["API keys"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"api_keys.create","summary":"Create an API key","description":"Mints a key that acts as you, narrowed to the given abilities, projects, credit limit, addresses and expiry. The response carries the secret once; it is never shown again. You can only grant abilities your own role allows.","tags":["API keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"scopes":{"type":"array","minItems":1,"maxItems":100,"items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"project_access":{"enum":["all","selected"],"type":"string","default":"all"},"project_ids":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"},"default":[]},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_ips":{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"},{"type":"string","pattern":"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$"},{"type":"string","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$"}]},"default":[]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["organization_id","name","scopes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]},"token":{"type":"string"}},"required":["api_key","token"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/api-keys/{api_key_id}":{"get":{"operationId":"api_keys.get","summary":"Get an API key","description":"Returns a single API key. Scoped to the API key named by `api_key_id`.","tags":["API keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-5ae6-76d0-9b18-7c934ef05a06"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"api_keys.update","summary":"Update an API key","description":"Changes a key's name, abilities, projects, limit, addresses or expiry. The body must be sparse. A revoked key cannot be edited. Only the key's creator can widen it (add abilities or projects, loosen its addresses, extend its expiry or raise its limit); anyone who manages keys can rename or narrow it.","tags":["API keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-5ae6-76d0-9b18-7c934ef05a06"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"scopes":{"type":"array","minItems":1,"maxItems":100,"items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"project_access":{"enum":["all","selected"],"type":"string"},"project_ids":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"}},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_ips":{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"},{"type":"string","pattern":"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$"},{"type":"string","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$"}]}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"api_keys.revoke","summary":"Revoke an API key","description":"The key stops working at once. It stays listed, with what it spent, so its history keeps a name.","tags":["API keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-5ae6-76d0-9b18-7c934ef05a06"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys/{api_key_id}/rotate":{"post":{"operationId":"api_keys.rotate","summary":"Rotate an API key","description":"Mints a new secret for the key. The current secret keeps working for `previous_expires_in` (`now`, `1h`, `24h`, `3d` or `7d`), so you can switch every deploy before it stops; everything else about the key stays. The response carries the new secret once. Only the key's creator can rotate it, since the key acts as them.","tags":["API keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-5ae6-76d0-9b18-7c934ef05a06"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previous_expires_in":{"enum":["now","1h","24h","3d","7d"],"type":"string"}},"required":["previous_expires_in"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]},"token":{"type":"string"}},"required":["api_key","token"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys/{api_key_id}/secrets/{secret_id}":{"delete":{"operationId":"api_keys.expire_secret","summary":"Expire a rotated secret","description":"Ends the grace period of a secret a rotation replaced: it stops working now. The key's current secret cannot be expired this way; revoke or rotate the key instead.","tags":["API keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-5ae6-76d0-9b18-7c934ef05a06"},{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-6b14-7c02-8e41-2d5f0a9c3b17"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_access":{"enum":["all","selected"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"allowed_ips":{"type":"array","items":{"type":"string"}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"type":"string"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"token_prefix":{"type":"string"},"token_hint":{"type":"string"},"secret_created_at":{"type":"string","format":"date-time","x-native-type":"date"},"retiring_secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token_hint":{"type":"string"},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","token_hint","expires_at","last_used_at","created_at"]}},"scopes":{"type":"array","items":{"enum":["models:read","generations:read","generations:create","generations:cancel","voices:read","voices:write","transcripts:read","transcripts:create","assets:read","assets:write","assets:delete","projects:read","projects:write","chats:read","chats:write","canvases:read","canvases:write","skills:read","skills:write","schedules:read","schedules:write","sharing:read","sharing:write","connectors:read","social:read","social:query","search:query","credits:read","reports:read","profile:read","notifications:read","notifications:write","members:read","members:write","teams:read","teams:write","roles:read","roles:write","settings:read","settings:write","governance:read","governance:write","billing:read"],"type":"string"}},"status":{"enum":["active","expired","revoked"],"type":"string"},"project_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"capabilities":{"type":"object","properties":{"can_rotate":{"type":"boolean"},"can_widen":{"type":"boolean"}},"required":["can_rotate","can_widen"]}},"required":["id","organization_id","name","description","project_access","spending_limit","allowed_ips","expires_at","last_used_at","created_by_id","revoked_at","revoked_by_id","revoked_reason","created_at","updated_at","token_prefix","token_hint","secret_created_at","retiring_secrets","scopes","status","project_ids","created_by","credits_used","capabilities"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/members":{"get":{"operationId":"members.list","summary":"List members","description":"Lists the members the caller can read. Scoped to the organization named by `organization_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"include_teams","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},"team_ids":{"type":"array","items":{"type":"string"}}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user","team_ids"]},{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user"]}]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/members/{user_id}":{"get":{"operationId":"members.get","summary":"Get member","description":"Returns a single member. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},"team_ids":{"type":"array","items":{"type":"string"}}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user","team_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"members.update","summary":"Update member","description":"Updates a member and returns the updated row. Scoped to the organization named by `organization_id`, and the user named by `user_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"allocated_credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]}},"required":["id","user_id","role","spending_limit","allocated_credits","created_at","user"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"members.delete","summary":"Delete member","description":"Deletes a member. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/members/{user_id}/credits":{"get":{"operationId":"members.credits","summary":"Get member credits","description":"Get member credits. Scoped to the organization named by `organization_id`, and the user named by `user_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^user_"},"example":"user_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"org_available":{"type":"number"},"org_used":{"type":"number"},"org_total":{"type":"number"},"user_used":{"type":"number"},"team_used":{"type":"number"},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"spending_limit_source":{"anyOf":[{"enum":["user","team"],"type":"string"},{"type":"null"}]},"spending_limit_remaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["available","org_available","org_used","org_total","user_used","team_used","spending_limit","spending_limit_source","spending_limit_remaining","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/leave":{"post":{"operationId":"members.leave","summary":"Leave organization","description":"Leave organization. Scoped to the organization named by `organization_id`.","tags":["Members"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/invitations":{"get":{"operationId":"invitations.list","summary":"List invitations","description":"Lists the invitations the caller can read. Scoped to the organization named by `organization_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"status":{"enum":["pending","accepted","revoked"],"type":"string"},"team_ids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"inviter":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","email_address","role","status","team_ids","spending_limit","expires_at","created_at","inviter"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"invitations.create","summary":"Create invitation","description":"Creates an invitation and returns the created row. Scoped to the organization named by `organization_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"email_address":{"type":"string","format":"email"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string","default":"org:member"},"team_ids":{"type":"array","maxItems":1,"items":{"type":"string"}},"spending_limit":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["email_address"]}}},"required":["invitations"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"}},"required":["id","email_address","role"]}},"errors":{"type":"array","items":{"type":"object","properties":{"email_address":{"type":"string"},"error":{"type":"string"}},"required":["email_address","error"]}}},"required":["invitations","errors"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/invitations/{invitation_id}":{"patch":{"operationId":"invitations.update","summary":"Update invitation","description":"Updates an invitation and returns the updated row. Scoped to the organization named by `organization_id`, and the invitation named by `invitation_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^orginv_"},"example":"orginv_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"team_ids":{"type":"array","maxItems":1,"items":{"type":"string"}},"spending_limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email_address":{"type":"string"},"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"status":{"enum":["pending","accepted","revoked"],"type":"string"},"team_ids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"spending_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"inviter":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","email_address","role","status","team_ids","spending_limit","expires_at","created_at","inviter"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"invitations.delete","summary":"Delete invitation","description":"Deletes an invitation. Scoped to the organization named by `organization_id`, and the invitation named by `invitation_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^orginv_"},"example":"orginv_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/invitations/{invitation_id}/decline":{"post":{"operationId":"invitations.decline","summary":"Decline invitation","description":"Decline invitation. Scoped to the organization named by `organization_id`, and the invitation named by `invitation_id`.","tags":["Invitations"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^orginv_"},"example":"orginv_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/roles":{"get":{"operationId":"roles.list","summary":"List roles","description":"Lists the roles the caller can read. Scoped to the organization named by `organization_id`.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","content:create","content:delete_own","content:read_any","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}},"caller":{"type":"object","properties":{"role":{"anyOf":[{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","content:create","content:delete_own","content:read_any","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}},"required":["roles","caller"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"roles.set_permissions","summary":"Set role permissions","description":"Set role permissions. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","content:create","content:delete_own","content:read_any","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","content:create","content:delete_own","content:read_any","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"roles.reset_permissions","summary":"Reset role permissions","description":"Reset role permissions. Scoped to the organization named by `organization_id`.","tags":["Roles"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["org:admin","org:billing_manager","org:member","org:viewer"],"type":"string"},"permissions":{"type":"array","items":{"enum":["billing:manage","members:manage","roles:manage","workspace:manage","api_keys:manage","content:create","content:delete_own","content:read_any","content:edit_any","content:delete_any","governance:read","governance:write"],"type":"string"}}},"required":["role","permissions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/access/{resource_type}/{resource_id}":{"get":{"operationId":"access.get","summary":"Get access","description":"Returns a single access. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","user_id","role","granted_by_id","created_at"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}}},"required":["resource_type","resource_id","owner_id","role","shared","capabilities","can_leave","general_access","general_access_editable","grants","inherited"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"access.update_general_access","summary":"Update access general access","description":"Update access general access. Scoped to the resource named by `resource_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","user_id","role","granted_by_id","created_at"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}}},"required":["resource_type","resource_id","owner_id","role","shared","capabilities","can_leave","general_access","general_access_editable","grants","inherited"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/access/{resource_type}/{resource_id}/grants":{"post":{"operationId":"access.create_grant","summary":"Create access grant","description":"Create access grant. Scoped to the resource named by `resource_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","user_id","role","granted_by_id","created_at"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}}},"required":["resource_type","resource_id","owner_id","role","shared","capabilities","can_leave","general_access","general_access_editable","grants","inherited"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/access/{resource_type}/{resource_id}/grants/{grant_id}":{"patch":{"operationId":"access.update_grant","summary":"Update access grant","description":"Update access grant. Scoped to the resource named by `resource_id`, and the grant named by `grant_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"enum":["viewer","editor"],"type":"string"}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","user_id","role","granted_by_id","created_at"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}}},"required":["resource_type","resource_id","owner_id","role","shared","capabilities","can_leave","general_access","general_access_editable","grants","inherited"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"access.delete_grant","summary":"Delete access grant","description":"Delete access grant. Scoped to the resource named by `resource_id`, and the grant named by `grant_id`.","tags":["Access"],"parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["viewer","editor","owner"],"type":"string"},"shared":{"type":"boolean"},"capabilities":{"type":"object","properties":{"can_edit":{"type":"boolean"},"can_manage_people":{"type":"boolean"},"can_change_general_access":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["can_edit","can_manage_people","can_change_general_access","can_delete"]},"can_leave":{"type":"boolean"},"general_access":{"type":"object","properties":{"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"}},"required":["visibility","workspace_role"]},"general_access_editable":{"type":"boolean"},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","user_id","role","granted_by_id","created_at"]}},"inherited":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["chat","canvas","project"],"type":"string"},"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"enum":["origin","reference"],"type":"string"},"role":{"enum":["viewer","editor","owner"],"type":"string"},"through":{"enum":["chat","canvas"],"type":"string"},"audience":{"type":"boolean"}},"required":["kind","id","title","emoji","via","role","audience"]}}},"required":["resource_type","resource_id","owner_id","role","shared","capabilities","can_leave","general_access","general_access_editable","grants","inherited"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets":{"get":{"operationId":"assets.list","summary":"List assets","description":"Lists the assets the caller can read.","tags":["Assets"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"enum":["generated","uploaded","imported"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"models","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"assets.create","summary":"Create asset","description":"Creates an asset and returns the created row.","tags":["Assets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"files":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","properties":{"mime_type":{"type":"string","minLength":1,"maxLength":255},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{}},"required":["mime_type"]}},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","files"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"uploads":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"upload_url":{"type":"string","format":"uri"}},"required":["asset","upload_url"]}}},"required":["uploads"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/assets/models":{"get":{"operationId":"assets.list_models","summary":"List models used by assets","description":"List models used by assets.","tags":["Assets"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["models"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/imports/link":{"post":{"operationId":"assets.import_from_link","summary":"Import asset from link","description":"Import asset from link.","tags":["Assets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["asset"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/assets/{asset_id}":{"get":{"operationId":"assets.get","summary":"Get asset","description":"Returns a single asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"assets.update","summary":"Update asset","description":"Updates an asset and returns the updated row. Scoped to the asset named by `asset_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"document_sync":{"enum":["synced","unconfirmed"],"type":"string"}},"required":["asset"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"assets.delete","summary":"Delete asset","description":"Deletes an asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{asset_id}/voices":{"get":{"operationId":"assets.list_voices","summary":"List asset voices","description":"List asset voices. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"quick_action_id":{"type":"string"},"name":{"type":"string"},"model_name":{"type":"string"},"role":{"enum":["sample","generated"],"type":"string"}},"required":["quick_action_id","name","model_name","role"]}}},"required":["voices"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{asset_id}/imported-parameters":{"get":{"operationId":"assets.get_imported_parameters","summary":"Get asset imported parameters","description":"Get asset imported parameters. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"imported_parameters":{"anyOf":[{"type":"object","properties":{"source":{"enum":["mod","dual"],"type":"string"},"media_model_id":{"type":"string"},"media_model_version_id":{"type":"string"},"version_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quick_action_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"untranslated_fields":{"type":"array","items":{"type":"string"}}},"required":["source","media_model_id","media_model_version_id","version_number","quick_action_id","parameters","untranslated_fields"]},{"type":"null"}]}},"required":["imported_parameters"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{asset_id}/prompt":{"post":{"operationId":"assets.extract_prompt","summary":"Extract prompt from asset","description":"Extract prompt from asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"cached":{"type":"boolean"}},"required":["prompt","cached"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{asset_id}/restore":{"post":{"operationId":"assets.restore","summary":"Restore asset","description":"Restore asset. Scoped to the asset named by `asset_id`.","tags":["Assets"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations":{"get":{"operationId":"generations.list","summary":"List generations","description":"Lists the generations the caller can read.","tags":["Generations"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"model_id","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_id","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_id","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","url"]}}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","quoted_per_output","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"generations.create","summary":"Create generation","description":"Creates a generation and returns the created row.","tags":["Generations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"output_type":{"enum":["image","video","audio","3d"],"type":"string"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallback_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"canvas_position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},{"type":"null"}]},"canvas_size":{"anyOf":[{"type":"object","properties":{"w":{"type":"number","exclusiveMinimum":0},"h":{"type":"number","exclusiveMinimum":0}},"required":["w","h"]},{"type":"null"}]},"page_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"max_credits":{"type":"number","minimum":0},"dispatch":{"enum":["auto","inline"],"type":"string","default":"auto"}},"required":["organization_id","output_type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"generation_id":{"type":"string"},"reused":{"type":"boolean"},"status":{"enum":["running","completed","failed"],"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"quote":{"type":"object","properties":{"per_output":{"type":"number"},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"number"}},"required":["per_output","count","total"]},"credits_charged":{"type":"number"},"assets":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"}},"required":["asset_id","url","type"]}}},"required":["generation_id","reused","status","model","quote","credits_charged","assets"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/generations/quote":{"post":{"operationId":"generations.quote","summary":"Quote generation","description":"Quote generation.","tags":["Generations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"output_type":{"enum":["image","video","audio","3d"],"type":"string"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallback_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","output_type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"output_type":{"type":"string"},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","output_type","version_id","version_number"]},"media_model_variant_id":{"type":"string"},"provider":{"type":"string"},"is_fallback":{"type":"boolean"},"quote":{"type":"object","properties":{"per_output":{"type":"number"},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"total":{"type":"number"}},"required":["per_output","count","total"]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["model","media_model_variant_id","provider","is_fallback","quote","parameters"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/generations/{generation_id}":{"get":{"operationId":"generations.get","summary":"Get generation","description":"Returns a single generation. Scoped to the generation named by `generation_id`.","tags":["Generations"],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-b04c-7036-a91e-3d6f8c25b7e0"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]}}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","quoted_per_output","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number","assets"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"generations.update","summary":"Update generation","description":"Updates a generation and returns the updated row. Scoped to the generation named by `generation_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Generations"],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-b04c-7036-a91e-3d6f8c25b7e0"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["pending","running","completed","failed"],"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"generation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","quoted_per_output","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at"]}},"required":["generation"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/library":{"get":{"operationId":"library.list","summary":"List library","description":"Lists the library the caller can read.","tags":["Library"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"models","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"statuses","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"enum":["generated","uploaded","imported"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"conversation_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"canvas_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by_id":{"type":"string"},"status":{"enum":["ready","generating","failed"],"type":"string"},"type":{"anyOf":[{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"enum":["generated","uploaded","imported"],"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"asset":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"linked_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},{"type":"null"}]},"generation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"media_model_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quick_action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["pending","running","completed","failed"],"type":"string"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"quoted_per_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"fal_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"replicate_request_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_prediction_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconcile_attempts":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"media_model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","organization_id","created_by_id","media_model_variant_id","media_model_id","quick_action_id","status","parameters","quoted_per_output","error","error_code","canvas_id","message_id","tool_call_id","source_generation_id","api_key_id","project_id","fal_request_id","replicate_request_id","replicate_prediction_id","started_at","completed_at","deleted_at","deleted_by_id","reconcile_attempts","created_at","updated_at","media","media_model_name","media_model_version_id","version_number"]},{"type":"null"}]}},"required":["id","created_at","created_by_id","status","type","media_model_id","source","deleted_at","asset","generation"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts":{"post":{"operationId":"transcripts.create","summary":"Create transcript","description":"Creates a transcript and returns the created row.","tags":["Transcripts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"source_asset_id":{"type":"string","format":"uuid"},"source_url":{"type":"string","format":"uri"},"audio_url":{"type":"string","format":"uri"},"source_filename":{"type":"string"},"mime_type":{"type":"string","maxLength":255},"language":{"type":"string"},"method":{"enum":["fast","high-quality"],"type":"string"},"title":{"type":"string"},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","created_at","updated_at"]},"outcome":{"enum":["created","reused"],"type":"string"}},"required":["asset","detail","outcome"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/transcripts/audio":{"post":{"operationId":"transcripts.reserve_audio","summary":"Reserve transcript audio upload","description":"Reserve transcript audio upload.","tags":["Transcripts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"mime_type":{"type":"string","minLength":1,"maxLength":255}},"required":["organization_id","mime_type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"uri"},"audio_url":{"type":"string","format":"uri"}},"required":["upload_url","audio_url"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/transcripts/{transcript_id}":{"get":{"operationId":"transcripts.get","summary":"Get transcript","description":"Returns a single transcript. Scoped to the transcript named by `transcript_id`.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","created_at","updated_at"]}},"required":["asset","detail"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"transcripts.update","summary":"Update transcript","description":"Updates a transcript and returns the updated row. Scoped to the transcript named by `transcript_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"identified_speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"replacements":{"type":"array","items":{"type":"object","properties":{"find":{"type":"string","minLength":1},"replace":{"type":"string"}},"required":["find","replace"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","created_at","updated_at"]}},"required":["asset","detail"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{transcript_id}/language":{"post":{"operationId":"transcripts.switch_language","summary":"Switch transcript language","description":"Switch transcript language. Scoped to the transcript named by `transcript_id`.","tags":["Transcripts"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language_code":{"type":"string","minLength":2,"maxLength":35}},"required":["language_code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at"]},"detail":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"speaker_id":{"type":"string"},"start_sec":{"type":"number"},"end_sec":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"number"},"e":{"type":"number"}},"required":["t","s","e"]}}},"required":["id","speaker_id","start_sec","end_sec","words"]}},"speakers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"talk_pct":{"type":"number"}},"required":["id","name","talk_pct"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_sec":{"type":"number"}},"required":["id","title","start_sec"]}},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"requested_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"enum":["fast","high-quality"],"type":"string"},{"type":"null"}]},"transcribed_by":{"anyOf":[{"enum":["captions","audio","generated"],"type":"string"},{"type":"null"}]},"live":{"type":"boolean"},"failed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"supadata_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["asset_id","segments","speakers","chapters","organization_id","created_by_id","source","requested_language","transcript_language","tier","transcribed_by","live","failed_at","supadata_job_id","created_at","updated_at"]}},"required":["asset","detail"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/canvases":{"get":{"operationId":"canvases.list","summary":"List canvases","description":"Lists the canvases the caller can read.","tags":["Canvases"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","required":false,"schema":{"enum":["all","mine","shared"],"type":"string","default":"all"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete","created_by"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"canvases.create","summary":"Create canvas","description":"Creates a canvas and returns the created row.","tags":["Canvases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}},"project_id":{"type":"string","format":"uuid"}},"required":["organization_id","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/canvases/{canvas_id}":{"get":{"operationId":"canvases.get","summary":"Get canvas","description":"Returns a single canvas. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"canvases.update","summary":"Update canvas","description":"Updates a canvas and returns the updated row. Scoped to the canvas named by `canvas_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"canvases.delete","summary":"Delete canvas","description":"Deletes a canvas. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/canvases/{canvas_id}/access":{"get":{"operationId":"canvases.get_access","summary":"Get canvas access","description":"Get canvas access. Scoped to the canvas named by `canvas_id`.","tags":["Canvases"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"can_write":{"type":"boolean"}},"required":["can_write"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/models":{"get":{"operationId":"workspace_models.list","summary":"List workspace models","description":"Lists the workspace models the caller can read. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"output_type","in":"query","schema":{"enum":["text","image","video","audio","3d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"unlisted":{"type":"boolean"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"enabled":{"type":"boolean"},"plan_available":{"type":"boolean"},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"cost_floor":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"cost_floor_by_input":{"type":"object","properties":{"image":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"video":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"audio":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]}}},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default"]},"default":[]},"quick_actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_id":{"type":"string","format":"uuid"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"voice_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","media_model_id","organization_id","created_by_id","visibility","voice_id","codename","name","description","schema"]},"default":[]}},"required":["id","codename","name","owner","description","released_at","output_type","type","minimum_required_plan","position","unlisted","parameters","version_id","version_number","enabled","plan_available","base_cost","cost_floor","cost_floor_by_input"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"workspace_models.set_state","summary":"Set workspace model state","description":"Set workspace model state. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","minItems":1,"items":{"type":"string"}},"enabled":{"type":"boolean"}},"required":["scope","model_ids","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["model_id","enabled"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/models/governance":{"get":{"operationId":"workspace_models.governance","summary":"Get workspace model governance","description":"Get workspace model governance. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"kind","in":"query","required":true,"schema":{"enum":["workspace","team","user"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"name":"output_type","in":"query","required":false,"schema":{"enum":["text","image","video","audio","3d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"access":{"enum":["everyone","allowlist","denylist"],"type":"string"},"unlisted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default","deleted_at","created_at","updated_at"]},"default":[]},"state":{"enum":["off","inherit"],"type":"string"},"locked":{"type":"boolean"},"locked_by":{"anyOf":[{"enum":["workspace","team","admin"],"type":"string"},{"type":"null"}]},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"position_from":{"anyOf":[{"enum":["workspace","team","user"],"type":"string"},{"type":"null"}],"default":null}},"required":["id","codename","name","owner","description","released_at","output_type","type","minimum_required_plan","position","access","unlisted","deleted_at","deleted_by_id","created_at","updated_at","parameters","version_id","version_number","state","locked","locked_by","base_cost"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/models/position":{"put":{"operationId":"workspace_models.set_position","summary":"Set workspace model positions","description":"Set workspace model positions. Scoped to the organization named by `organization_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","maxItems":500,"items":{"type":"string"}}},"required":["scope","model_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"model_ids":{"type":"array","items":{"type":"string"}}},"required":["model_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/models/{media_model_id}/versions/{version_id}":{"get":{"operationId":"workspace_models.version","summary":"Get workspace model version","description":"Get workspace model version. Scoped to the organization named by `organization_id`, and the media model named by `media_model_id`, and the version named by `version_id`.","tags":["Workspace models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"media_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-f480-747a-ad52-1c3b7e95f24d"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"released_at":{"type":"string"},"output_type":{"enum":["text","image","video","audio","3d"],"type":"string"},"type":{"anyOf":[{"enum":["edit","convert","remix"],"type":"string"},{"type":"null"}]},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number","minimum":-140737488355328,"maximum":140737488355327},"unlisted":{"type":"boolean"},"parameters":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version_status":{"enum":["draft","current","superseded","disabled","discarded"],"type":"string"},"enabled":{"type":"boolean"},"plan_available":{"type":"boolean"},"base_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"cost_floor":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"cost_floor_by_input":{"type":"object","properties":{"image":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"video":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]},"audio":{"type":"object","properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"open_ended":{"type":"boolean"}},"required":["min","max","parameters","open_ended"]}}},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_version_id":{"type":"string","format":"uuid"},"key":{"type":"string"},"fal_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"replicate_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"elevenlabs_model_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_provider_input":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_provider_output":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_mapper":{"anyOf":[{"type":"string"},{"type":"null"}]},"match_rule":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"priority":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"enabled":{"type":"boolean"},"is_default":{"type":"boolean"}},"required":["id","media_model_version_id","key","fal_model_id","replicate_model_id","elevenlabs_model_id","to_provider_input","from_provider_output","cost_mapper","match_rule","priority","enabled","is_default"]},"default":[]},"quick_actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"media_model_id":{"type":"string","format":"uuid"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"voice_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","media_model_id","organization_id","created_by_id","visibility","voice_id","codename","name","description","schema"]},"default":[]}},"required":["id","codename","name","owner","description","released_at","output_type","type","minimum_required_plan","position","unlisted","parameters","version_id","version_number","enabled","plan_available","base_cost","cost_floor","cost_floor_by_input"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/alert-policy":{"get":{"operationId":"alert_policy.get","summary":"Get alert policy","description":"Returns a single alert policy. Scoped to the organization named by `organization_id`.","tags":["Alert policy"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"always_ask_above_enabled":{"type":"boolean"},"always_ask_above_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"auto_accept_below_enabled":{"type":"boolean"},"auto_accept_below_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"default_action":{"enum":["accept","decline"],"type":"string"},"countdown_seconds":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["enabled","always_ask_above_enabled","always_ask_above_credits","auto_accept_below_enabled","auto_accept_below_credits","default_action","countdown_seconds"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"alert_policy.update","summary":"Update alert policy","description":"Updates an alert policy and returns the updated row. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Alert policy"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"always_ask_above_enabled":{"type":"boolean"},"always_ask_above_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"auto_accept_below_enabled":{"type":"boolean"},"auto_accept_below_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"default_action":{"enum":["accept","decline"],"type":"string"},"countdown_seconds":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["enabled","always_ask_above_enabled","always_ask_above_credits","auto_accept_below_enabled","auto_accept_below_credits","default_action","countdown_seconds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"always_ask_above_enabled":{"type":"boolean"},"always_ask_above_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"auto_accept_below_enabled":{"type":"boolean"},"auto_accept_below_credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"default_action":{"enum":["accept","decline"],"type":"string"},"countdown_seconds":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["enabled","always_ask_above_enabled","always_ask_above_credits","auto_accept_below_enabled","auto_accept_below_credits","default_action","countdown_seconds"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/billing":{"get":{"operationId":"billing.info","summary":"Get billing info","description":"Get billing info. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string"},"organization_name":{"type":"string"},"has_customer":{"type":"boolean"},"has_subscription":{"type":"boolean"},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"balance":{"anyOf":[{"type":"number"},{"type":"null"}]},"delinquent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"chargeable_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]}},"required":["id","email","billing_emails","balance","delinquent"]},{"type":"null"}]},"subscription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["active","canceled","incomplete","incomplete_expired","past_due","paused","trialing","unpaid"],"type":"string"},"is_active":{"type":"boolean"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_invoice":{"anyOf":[{"type":"object","properties":{"amount_due":{"type":"number"},"currency":{"type":"string"},"billed_at":{"type":"string"}},"required":["amount_due","currency","billed_at"]},{"type":"null"}]},"cancel_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"trial_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"collection_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancels_at_trial_end":{"type":"boolean"},"is_linked":{"type":"boolean"},"latest_invoice":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount_due":{"type":"number"},"amount_paid":{"type":"number"},"currency":{"type":"string"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"created":{"type":"string"}},"required":["status","amount_due","amount_paid","currency","hosted_invoice_url","due_date","created"]},{"type":"null"}]},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"coupon_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"percent_off":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount_off":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration_in_months":{"anyOf":[{"type":"number"},{"type":"null"}]},"end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","coupon_name","percent_off","amount_off","currency","duration","duration_in_months","end"]}},"collection_state":{"type":"object","properties":{"collects":{"enum":["card","card_missing","card_unknown","emailed_invoice","outside_stripe","nothing_free"],"type":"string"},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"card_expired":{"type":"boolean"},"card_source":{"anyOf":[{"enum":["subscription","customer"],"type":"string"},{"type":"null"}]},"customer_default_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_outcome":{"anyOf":[{"enum":["bills","cancels","pauses","unknown"],"type":"string"},{"type":"null"}]},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end_behavior":{"anyOf":[{"type":"string"},{"type":"null"}]},"self_renews":{"type":"boolean"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_reason":{"anyOf":[{"enum":["scheduled_date","period_end","trial_end","canceled"],"type":"string"},{"type":"null"}]},"next_bill":{"enum":["scheduled","none","passed","unknown"],"type":"string"},"next_bill_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_payment":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"out_of_band":{"type":"boolean"}},"required":["at","amount","currency","out_of_band"]},{"type":"null"}]},"open_drafts":{"type":"number"}},"required":["collects","has_payment_method","card","card_expired","card_source","customer_default_card","billing_email","trial_outcome","trial_ends_at","trial_end_behavior","self_renews","ends_at","ends_reason","next_bill","next_bill_at","last_payment","open_drafts"]},"plan":{"anyOf":[{"type":"object","properties":{"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["plan_id","name","credits","price","currency","interval"]},{"type":"null"}]},"scheduled_change":{"anyOf":[{"type":"object","properties":{"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"managed_by_staff":{"type":"boolean"},"new_plan":{"type":"object","properties":{"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"type":"string"},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["plan_id","name","credits","price","currency","interval"]}},"required":["effective_date","new_plan"]},{"type":"null"}]}},"required":["id","status","is_active","current_period_start","current_period_end","cancel_at","canceled_at","trial_end","plan","scheduled_change"]},{"type":"null"}]},"available_plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"plan_id":{"anyOf":[{"enum":["hobby","basic","pro","business","trial","internal","usage"],"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"prices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"usage_interval":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_interval_count":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","amount","currency","interval","credits","usage_interval","usage_interval_count"]}}},"required":["id","plan_id","name","description","prices"]}},"credit_purchase":{"type":"object","properties":{"blocked_reason":{"anyOf":[{"enum":["no_subscription","plan_too_low","zero_plan","usage_plan","contract_unpriced","rate_underivable"],"type":"string"},{"type":"null"}]},"rate":{"anyOf":[{"type":"object","properties":{"unit_amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"credits_per_billing_period":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"credits_per_cycle":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"currency":{"type":"string"}},"required":["unit_amount_cents","credits_per_billing_period","credits_per_cycle","currency"]},{"type":"null"}]}},"required":["blocked_reason","rate"]}},"required":["organization_id","organization_name","has_customer","has_subscription","customer","subscription","available_plans","credit_purchase"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/billing/events":{"get":{"operationId":"billing.events","summary":"List billing events","description":"List billing events. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":30,"default":30},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"}},"required":["id","type","title","description","created_at"]}}},"required":["events"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/billing/customer":{"post":{"operationId":"billing.create_customer","summary":"Create billing customer","description":"Create billing customer. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"billing_emails":{"type":"array","items":{"type":"string","format":"email"}}},"required":["name","email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"balance":{"anyOf":[{"type":"number"},{"type":"null"}]},"delinquent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"chargeable_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]}},"required":["id","email","billing_emails","balance","delinquent"]},"status":{"enum":["created","linked","existing"],"type":"string"}},"required":["customer","status"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"billing.update_customer","summary":"Update billing customer","description":"Update billing customer. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"billing_emails":{"type":"array","items":{"type":"string","format":"email"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"balance":{"anyOf":[{"type":"number"},{"type":"null"}]},"delinquent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"has_payment_method":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]},"chargeable_card":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"anyOf":[{"type":"number"},{"type":"null"}]},"exp_year":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"type":"boolean"}},"required":["type","brand","last4","exp_month","exp_year","funding","is_default"]},{"type":"null"}]}},"required":["id","email","billing_emails","balance","delinquent"]}},"required":["customer"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/billing/portal-sessions":{"post":{"operationId":"billing.create_portal_session","summary":"Create billing portal session","description":"Create billing portal session. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["url"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/subscription":{"get":{"operationId":"billing.subscription_status","summary":"Get subscription status","description":"Get subscription status. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"has_subscription":{"type":"boolean"},"status":{"anyOf":[{"enum":["active","canceled","incomplete","incomplete_expired","past_due","paused","trialing","unpaid"],"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"plan":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}]}},"required":["name","credits","price","currency","interval"]},{"type":"null"}]},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trial_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["has_subscription","status","plan","current_period_end","cancel_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"billing.change_plan","summary":"Change subscription plan","description":"Change subscription plan. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price_id":{"type":"string","minLength":1}},"required":["price_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"is_upgrade":{"type":"boolean"},"subscription_id":{"type":"string"},"new_price_id":{"type":"string"},"scheduled_at":{"type":"string"}},"required":["is_upgrade","subscription_id","new_price_id"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/subscription/preview":{"get":{"operationId":"billing.preview_change","summary":"Preview plan change","description":"Preview plan change. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"price_id","in":"query","required":true,"schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"is_upgrade":{"type":"boolean"},"current_plan":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","price","credits"]},"new_plan":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"credits":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","price","credits"]},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"immediate_charge":{"type":"number"},"effective_at":{"type":"string"},"next_billing_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_grant":{"type":"object","properties":{"credits":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["credits","effective_at","expires_at"]}},"required":["is_upgrade","current_plan","new_plan","current_period_end","immediate_charge"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/subscription/scheduled-change":{"delete":{"operationId":"billing.cancel_scheduled_change","summary":"Cancel scheduled plan change","description":"Cancel scheduled plan change. Scoped to the organization named by `organization_id`.","tags":["Billing"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/credits":{"get":{"operationId":"credits.balance","summary":"Get credit balance","description":"Get credit balance. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"used":{"type":"number"},"total":{"type":"number"},"subscription_credits":{"type":"number"},"purchase_credits":{"type":"number"},"buckets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"number"},"remaining":{"type":"number"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","amount","remaining","expires_at"]}},"usage_cycle_start":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage_cycle_end":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["available","used","total","subscription_credits","purchase_credits","buckets","usage_cycle_start","usage_cycle_end"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/credits/free-benefit":{"get":{"operationId":"credits.free_benefit","summary":"Free credits benefit","description":"Free credits benefit. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"receives_free_credits":{"type":"boolean"},"withheld":{"type":"boolean"}},"required":["receives_free_credits","withheld"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/credits/cycle":{"get":{"operationId":"credits.cycle","summary":"Get credit cycle","description":"Get credit cycle. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at"]},"window":{"anyOf":[{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"basis":{"enum":["free","contract","postpaid","trial","invoice"],"type":"string"}},"required":["start","end","basis"]},{"type":"null"}]},"starts_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_refill_credits":{"type":"number"},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at"]}}},"required":["current","window","starts_at","next_refill_credits","history"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/credits/transactions":{"get":{"operationId":"credits.transactions","summary":"List credit transactions","description":"List credit transactions. Scoped to the organization named by `organization_id`.","tags":["Credits"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","refunded_usage","plan_adjustment","usage","expiration","opening_adjustment","refunded_purchase","refunded_subscription","adjustment"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"end_date","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"type":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","usage","expiration","opening_adjustment","refunded_usage","refunded_purchase","refunded_subscription","adjustment","plan_adjustment"],"type":"string"},"amount":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"remaining":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"grant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"feature":{"anyOf":[{"type":"string"},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"stripe_checkout_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"effective_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"user":{"anyOf":[{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["first_name","last_name","email","image_url"]},{"type":"null"}]},"team":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","color"]},{"type":"null"}]}},"required":["id","organization_id","user_id","team_id","type","amount","remaining","grant_id","description","feature","generation_id","conversation_id","asset_id","message_id","tool_call_id","api_key_id","stripe_checkout_session_id","idempotency_key","stripe_invoice_id","expires_at","effective_at","created_at","user","team"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"has_more_future":{"type":"boolean"}},"required":["transactions","total","limit","offset","has_more_future"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/query":{"post":{"operationId":"reports.query","summary":"Query a usage report","description":"Query a usage report.","tags":["Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^org_"},"description":"The workspaces the report covers, by id. The caller must be a member of every one."},"metrics":{"type":"array","minItems":1,"items":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"description":"The first metric orders a ranking and a breakdown."},"group_by":{"enum":["none","day","week","month","user","workspace","team","feature","model","output_type","status","provider","source","credit_type","channel","tool"],"type":"string","default":"none"},"period":{"anyOf":[{"type":"object","properties":{"kind":{"const":"last_days"},"days":{"anyOf":[{"const":1},{"const":7},{"const":14},{"const":30},{"const":90}]}},"required":["kind","days"]},{"type":"object","properties":{"kind":{"const":"billing_cycle"},"offset":{"type":"integer","minimum":-24,"maximum":0,"description":"0 (or none) = the current cycle, -1 = the one before it, and so on."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"all_time"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"custom"},"from":{"type":"string","format":"date","description":"A calendar date in the report's timezone (YYYY-MM-DD)."},"to":{"type":"string","format":"date","description":"Exclusive: the first day NOT counted."}},"required":["kind","from","to"]}]},"timezone":{"type":"string","default":"UTC","description":"Day, week and month buckets and the period edges use this zone."},"filters":{"type":"object","properties":{"user_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^user_"}},"team_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"},"description":"The team each charge was made under."},"categories":{"type":"object","properties":{"feature":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"model":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"output_type":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"status":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"provider":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"source":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"credit_type":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"channel":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}},"tool":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"}}},"additionalProperties":false,"description":"Keep only facts whose category is one of these values: the keys a breakdown returns, e.g. a model's codename or a feature."}},"default":{}},"limit":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Rows in a ranking or a breakdown."}},"required":["organization_ids","metrics","period"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"audience":{"anyOf":[{"const":"all"},{"type":"array","items":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string"},"slug":{"type":"string"},"user_ids":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^user_"}},{"type":"null"}]}},"required":["organization_id","name","slug","user_ids"]}}],"description":"Whose usage the report counted: each workspace by id, name and slug. `user_ids: null` = every member of that workspace; a list = only those people."},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"earlier_cycle":{"type":"boolean","description":"Billing cycle periods only: whether a cycle before this one exists, so `offset - 1` can be asked."}},"required":["from","to","timezone"]},"result":{"anyOf":[{"type":"object","properties":{"shape":{"const":"kpi"},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["shape","values"]},{"type":"object","properties":{"shape":{"const":"series"},"interval":{"enum":["day","week","month"],"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","format":"date","description":"The first local day of the bucket. A week or month bucket at an edge of the period counts only the days inside it."},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["bucket","values"]}}},"required":["shape","interval","points"]},{"type":"object","properties":{"shape":{"const":"ranking"},"dimension":{"enum":["user","workspace","team"],"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted":{"type":"boolean"},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["id","name","detail","image_url","deleted","values"]}}},"required":["shape","dimension","rows"]},{"type":"object","properties":{"shape":{"const":"breakdown"},"category":{"enum":["feature","model","output_type","status","provider","source","credit_type","channel","tool"],"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"values":{"type":"object","propertyNames":{"enum":["credits_spent","credits_granted","runs","failed_runs","failed_runs_charged","completed_runs_uncharged","chats","messages","replies","assets","active_members","inactive_members","tool_calls","mcp_tool_calls","research_calls"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["key","label","values"]}}},"required":["shape","category","rows"]}]}},"required":["audience","period","result"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/organizations/{organization_id}/reports/balance":{"get":{"operationId":"reports.balance","summary":"Get credit balance and runway","description":"Get credit balance and runway. Scoped to the organization named by `organization_id`.","tags":["Reports"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"number"},"buckets":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"},"remaining":{"type":"number"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["type","amount","remaining","expires_at"]}},"runway":{"type":"object","properties":{"cycle":{"anyOf":[{"type":"object","properties":{"credits_per_day":{"type":"number"},"runs_out_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["credits_per_day","runs_out_on"]},{"type":"null"}]},"last_7_days":{"type":"object","properties":{"credits_per_day":{"type":"number"},"runs_out_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["credits_per_day","runs_out_on"]},"renewal":{"type":"object","properties":{"renews_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"credits_per_day":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["renews_on","credits_per_day"]}},"required":["cycle","last_7_days","renewal"]},"plan_history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["free","plan","contract","trial","internal","postpaid"],"type":"string"},"anchor_at":{"type":"string"},"interval":{"enum":["day","week","month","year"],"type":"string"},"interval_count":{"type":"number"},"credits_per_cycle":{"anyOf":[{"type":"number"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","source","anchor_at","interval","interval_count","credits_per_cycle","ends_at","ended_reason","created_at","plan_name"]}}},"required":["available","buckets","runway","plan_history"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/inventory":{"post":{"operationId":"reports.inventory","summary":"Get workspace inventory","description":"Get workspace inventory.","tags":["Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^org_"},"description":"The workspaces the report covers, by id. The caller must be a member of every one."}},"required":["organization_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"number"},"seats":{"anyOf":[{"type":"number"},{"type":"null"}]},"users":{"type":"number"},"projects":{"type":"number"},"canvases":{"type":"number"},"skills":{"type":"number"},"connectors":{"type":"number"},"scheduled_tasks":{"type":"number"},"skills_by_source":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]}}},"required":["workspaces","seats","users","projects","canvases","skills","connectors","scheduled_tasks","skills_by_source"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/connectors":{"post":{"operationId":"connectors.create","summary":"Create connector","description":"Creates a connector and returns the created row.","tags":["Connectors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"label":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"url":{"type":"string","format":"uri"},"transport":{"enum":["http","sse"],"type":"string"},"auth_kind":{"enum":["bearer","mcp_oauth"],"type":"string","default":"bearer"},"bearer_token_enc":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["organization_id","label","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"transport":{"enum":["http","sse"],"type":"string"},"auth_kind":{"enum":["clerk","mcp_oauth","bearer","slack_oauth"],"type":"string"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"client_env_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"catalog":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"catalog_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalog_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","label","description","url","transport","auth_kind","provider","scopes","client_env_prefix","enabled","catalog","catalog_fingerprint","catalog_at","created_by_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["connector"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/connectors/{connector_id}":{"patch":{"operationId":"connectors.update","summary":"Update connector","description":"Updates a connector and returns the updated row. Scoped to the connector named by `connector_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Connectors"],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-49d5-75cf-8a07-6b823de94795"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"url":{"type":"string","format":"uri"},"transport":{"enum":["http","sse"],"type":"string"},"scopes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"bearer_token_enc":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"transport":{"enum":["http","sse"],"type":"string"},"auth_kind":{"enum":["clerk","mcp_oauth","bearer","slack_oauth"],"type":"string"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"client_env_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"catalog":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"catalog_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalog_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","label","description","url","transport","auth_kind","provider","scopes","client_env_prefix","enabled","catalog","catalog_fingerprint","catalog_at","created_by_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["connector"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"connectors.delete","summary":"Delete connector","description":"Deletes a connector. Scoped to the connector named by `connector_id`.","tags":["Connectors"],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-49d5-75cf-8a07-6b823de94795"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connector-credentials":{"get":{"operationId":"connector_credentials.list","summary":"List connector credentials","description":"Lists the connector credentials the caller can read.","tags":["Connector credentials"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"array","items":{"type":"object","properties":{"connector_id":{"type":"string"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"secret":{"type":"string"}},"required":["connector_id","codename","secret"]}}},"required":["credentials"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connector-credentials/{connector_id}":{"patch":{"operationId":"connector_credentials.put","summary":"Set connector credential","description":"Set connector credential. Scoped to the connector named by `connector_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Connector credentials"],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-49d5-75cf-8a07-6b823de94795"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"secret":{"type":"string","minLength":1}},"required":["organization_id","secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"connector_credentials.delete","summary":"Delete connector credential","description":"Deletes a connector credential. Scoped to the connector named by `connector_id`.","tags":["Connector credentials"],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a3-49d5-75cf-8a07-6b823de94795"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills":{"get":{"operationId":"custom_skills.list","summary":"List custom skills","description":"Lists the custom skills the caller can read.","tags":["Custom skills"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"shared":{"type":"boolean"},"verified":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"resources":{"type":"object","properties":{"scripts":{"type":"number"},"references":{"type":"number"},"assets":{"type":"number"}},"required":["scripts","references","assets"]},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}},"required":["id","codename","organization_id","source","name","description","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at","created_by","shared","verified","can_edit","can_delete","state","resources","projects"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"custom_skills.create","summary":"Create custom skill","description":"Creates a custom skill and returns the created row.","tags":["Custom skills"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"body":{"type":"string","minLength":1},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}},"source":{"enum":["custom","community"],"type":"string"},"author":{"type":"string","maxLength":200},"project_id":{"type":"string","format":"uuid"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id","name","description","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at"]},"created":{"type":"boolean"}},"required":["skill","created"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/skills/{skill_id}":{"get":{"operationId":"custom_skills.get","summary":"Get custom skill","description":"Returns a single custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"shared":{"type":"boolean"},"verified":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"last_edit":{"anyOf":[{"type":"object","properties":{"by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["by","at"]},{"type":"null"}]},"listing":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"update_available":{"type":"boolean"}},"required":["slug","title","update_available"]},{"type":"null"}]}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at","created_by","shared","verified","can_edit","can_delete","last_edit","listing"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"custom_skills.update","summary":"Update custom skill","description":"Updates a custom skill and returns the updated row. Scoped to the skill named by `skill_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"body":{"type":"string","minLength":1},"files":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["path","content"]},{"type":"object","properties":{"path":{"type":"string","minLength":1},"delete":{"const":true}},"required":["path","delete"]}]},"file_changes":{"type":"array","minItems":1,"items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["path","content"]},{"type":"object","properties":{"path":{"type":"string","minLength":1},"delete":{"const":true}},"required":["path","delete"]}]}},"expected_updated_at":{"type":"string","format":"date-time","x-native-type":"date"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"custom_skills.delete","summary":"Delete custom skill","description":"Deletes a custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{skill_id}/restore":{"post":{"operationId":"custom_skills.restore","summary":"Restore custom skill","description":"Restore custom skill. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{skill_id}/versions":{"get":{"operationId":"custom_skills.versions.list","summary":"List custom skill versions","description":"Lists the custom skill versions the caller can read. Scoped to the skill named by `skill_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"skill_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string"},"description":{"type":"string"},"restored_from_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}}},"required":["changed","added","removed"]},{"type":"null"}]}},"required":["id","skill_id","organization_id","version","name","description","restored_from_version_id","created_by_id","created_at","created_by","changes"]}}},"required":["versions"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{skill_id}/versions/{version_id}":{"get":{"operationId":"custom_skills.versions.get","summary":"Get custom skill version","description":"Returns a single custom skill version. Scoped to the skill named by `skill_id`, and the version named by `version_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"skill_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"restored_from_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","skill_id","organization_id","version","name","description","body","files","restored_from_version_id","created_by_id","created_at","created_by"]}},"required":["version"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{skill_id}/versions/{version_id}/restore":{"post":{"operationId":"custom_skills.versions.restore","summary":"Restore custom skill version","description":"Restore custom skill version. Scoped to the skill named by `skill_id`, and the version named by `version_id`.","tags":["Custom skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","codename","organization_id","source","name","description","body","files","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["skill"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skill-catalog":{"get":{"operationId":"skill_catalog.list","summary":"List skill catalog","description":"Lists the skill catalog the caller can read.","tags":["Skill catalog"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"category","in":"query","required":false,"schema":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"categories":{"type":"array","items":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"}},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"type":"string"},"verified":{"type":"boolean"},"name":{"type":"string"},"uses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"added_skill_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","summary","categories","cover_url","author","verified","name","uses","added_skill_id"]}}},"required":["items"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skill-catalog/{slug}":{"get":{"operationId":"skill_catalog.get","summary":"Get skill catalog","description":"Returns a single skill catalog.","tags":["Skill catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"example":"launch-2026"},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"listing":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"categories":{"type":"array","items":{"enum":["marketing","content","social","video","image","audio","research","design"],"type":"string"}},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"type":"string"},"verified":{"type":"boolean"},"name":{"type":"string"},"uses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"added_skill_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"body":{"type":"string"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"]}}},"required":["id","slug","title","summary","categories","cover_url","author","verified","name","uses","added_skill_id","examples","license","source_url","description","body","updated_at","files"]}},"required":["listing"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skill-catalog/{slug}/add":{"post":{"operationId":"skill_catalog.add","summary":"Add skill catalog","description":"Add skill catalog.","tags":["Skill catalog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"example":"launch-2026"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"project_id":{"type":"string","format":"uuid"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skill_id":{"type":"string"},"created":{"type":"boolean"}},"required":["skill_id","created"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scheduled-tasks":{"get":{"operationId":"scheduled_tasks.list","summary":"List scheduled tasks","description":"Lists the scheduled tasks the caller can read.","tags":["Scheduled tasks"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","next_run_at","last_run_at","mod_schedule_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails","shared","can_edit","can_delete"]}}},"required":["items"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scheduled_tasks.create","summary":"Create scheduled task","description":"Creates a scheduled task and returns the created row.","tags":["Scheduled tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"name":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":32000},"model":{"type":"string","minLength":1},"chat_model_id":{"type":"string","format":"uuid"},"media_model":{"type":"string"},"media_intent":{"enum":["image","video"],"type":"string"},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekly"},"weekday":{"type":"integer","minimum":0,"maximum":6},"days":{"type":"array","minItems":1,"maxItems":7,"items":{"type":"integer","minimum":0,"maximum":6}}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timezone":{"type":"string","minLength":1},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}},"disabled_connector_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"disabled_skill_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"email_enabled":{"type":"boolean"},"email_recipient_ids":{"type":"array","maxItems":50,"items":{"type":"string"}},"email_recipient_emails":{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}},"required":["organization_id","name","prompt","model","cadence","time","timezone"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","next_run_at","last_run_at","mod_schedule_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails"]}},"required":["scheduled_task"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/scheduled-tasks/{scheduled_task_id}":{"get":{"operationId":"scheduled_tasks.get","summary":"Get scheduled task","description":"Returns a single scheduled task. Scoped to the scheduled task named by `scheduled_task_id`.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","next_run_at","last_run_at","mod_schedule_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"scheduled_tasks.update","summary":"Update scheduled task","description":"Updates a scheduled task and returns the updated row. Scoped to the scheduled task named by `scheduled_task_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":32000},"model":{"type":"string","minLength":1},"chat_model_id":{"type":"string","format":"uuid"},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekly"},"weekday":{"type":"integer","minimum":0,"maximum":6},"days":{"type":"array","minItems":1,"maxItems":7,"items":{"type":"integer","minimum":0,"maximum":6}}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timezone":{"type":"string","minLength":1},"status":{"enum":["active","paused"],"type":"string"},"disabled_connector_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"disabled_skill_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"email_enabled":{"type":"boolean"},"email_recipient_ids":{"type":"array","maxItems":50,"items":{"type":"string"}},"email_recipient_emails":{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"chat_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"media_model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"media_intent":{"anyOf":[{"enum":["image","video"],"type":"string"},{"type":"null"}]},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"time":{"type":"string"},"timezone":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"email_enabled":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"mod_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"last_run_status":{"anyOf":[{"enum":["in_progress","success","error","cancelled"],"type":"string"},{"type":"null"}]},"running_runs":{"type":"integer","minimum":0,"maximum":9007199254740991},"disabled_connector_ids":{"type":"array","items":{"type":"string"}},"disabled_skill_ids":{"type":"array","items":{"type":"string"}},"email_recipient_ids":{"type":"array","items":{"type":"string"}},"email_recipient_emails":{"type":"array","items":{"type":"string"}}},"required":["id","organization_id","created_by_id","name","prompt","model","chat_model_id","media_model","media_model_id","media_intent","time","timezone","status","visibility","workspace_role","email_enabled","next_run_at","last_run_at","mod_schedule_id","deleted_at","deleted_by_id","created_at","updated_at","last_run_status","running_runs","disabled_connector_ids","disabled_skill_ids","email_recipient_ids","email_recipient_emails"]}},"required":["scheduled_task"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"scheduled_tasks.delete","summary":"Delete scheduled task","description":"Deletes a scheduled task. Scoped to the scheduled task named by `scheduled_task_id`.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scheduled-tasks/{scheduled_task_id}/trigger":{"post":{"operationId":"scheduled_tasks.trigger","summary":"Trigger scheduled task","description":"Trigger scheduled task. Scoped to the scheduled task named by `scheduled_task_id`.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"}},"required":["run_id","conversation_id"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scheduled-tasks/{scheduled_task_id}/runs/cancel":{"post":{"operationId":"scheduled_tasks.cancel_run","summary":"Cancel scheduled task run","description":"Cancel scheduled task run. Scoped to the scheduled task named by `scheduled_task_id`.","tags":["Scheduled tasks"],"parameters":[{"name":"scheduled_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-c15d-7147-ba2f-7c8e0d36f915"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"}},"required":["run_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"boolean"},"status":{"enum":["in_progress","success","error","cancelled"],"type":"string"}},"required":["cancelled","status"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scheduled-task-runs":{"get":{"operationId":"scheduled_tasks.org_runs","summary":"List all scheduled task runs","description":"List all scheduled task runs.","tags":["Scheduled tasks"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"scheduled_task_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scheduled_task_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggered_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["in_progress","success","error","cancelled"],"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"type":"string","format":"date-time","x-native-type":"date"},"heartbeat_at":{"type":"string","format":"date-time","x-native-type":"date"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"credits_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_refunded":{"type":"integer","minimum":0,"maximum":9007199254740991},"schedule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_by_id":{"type":"string"},"time":{"type":"string"},"timezone":{"type":"string"},"visibility":{"enum":["private","workspace"],"type":"string"},"cadence":{"anyOf":[{"type":"object","properties":{"kind":{"const":"daily"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"weekdays"}},"required":["kind"]},{},{"type":"object","properties":{"kind":{"const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"const":"once"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","date"]}]},"status":{"enum":["active","paused"],"type":"string"}},"required":["id","name","created_by_id","time","timezone","visibility","status"]}},"required":["id","scheduled_task_id","organization_id","conversation_id","workflow_run_id","triggered_by_id","status","error","started_at","heartbeat_at","completed_at","credits_used","credits_refunded","schedule"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations":{"get":{"operationId":"conversations.list","summary":"List conversations","description":"Lists the conversations the caller can read.","tags":["Conversations"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","required":false,"schema":{"enum":["mine","shared","involved","all"],"type":"string","default":"mine"},"allowEmptyValue":true,"allowReserved":true},{"name":"include_scheduled","in":"query","required":false,"schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"project_ids","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"conversations.create","summary":"Create conversation","description":"Creates a conversation and returns the created row.","tags":["Conversations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"id":{"type":"string","format":"uuid"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]},"tools_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"personalization":{"anyOf":[{"type":"object","properties":{"nickname":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"about":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["nickname","role","about","instructions"]},{"type":"null"}]}},"required":["chat","tools_version","personalization"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/conversations/{conversation_id}":{"get":{"operationId":"conversations.get","summary":"Get conversation","description":"Returns a single conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"conversations.update","summary":"Update conversation","description":"Updates a conversation and returns the updated row. Scoped to the conversation named by `conversation_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"only_if_untitled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["chat"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"conversations.delete","summary":"Delete conversation","description":"Deletes a conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{conversation_id}/access":{"get":{"operationId":"conversations.get_access","summary":"Get conversation access","description":"Get conversation access. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"can_send":{"type":"boolean"}},"required":["can_send"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{conversation_id}/restore":{"post":{"operationId":"conversations.restore","summary":"Restore conversation","description":"Restore conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{conversation_id}/fork":{"post":{"operationId":"conversations.fork","summary":"Fork conversation","description":"Fork conversation. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"new_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at"]}},"required":["chat"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{conversation_id}/messages":{"get":{"operationId":"conversations.messages.list","summary":"List conversation messages","description":"Lists the conversation messages the caller can read. Scoped to the conversation named by `conversation_id`.","tags":["Conversations"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"role":{"enum":["system","user","assistant"],"type":"string"},"parts":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_message_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","conversation_id","role","parts","metadata","parent_id","created_by_id","model","mod_message_id","created_at"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chat-models/available":{"get":{"operationId":"chat_models.available","summary":"List available chat models","description":"List available chat models.","tags":["Chat models"],"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"price":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":1000000},"output":{"type":"number","minimum":0,"maximum":1000000},"cache_read":{"type":"number","minimum":0,"maximum":1000000},"cache_write":{"type":"number","minimum":0,"maximum":1000000}},"required":["input","output","cache_read","cache_write"]},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","price","cost_tier","minimum_required_plan","position","created_at"]}}},"required":["items"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/chat-models":{"get":{"operationId":"workspace_chat_models.list","summary":"List workspace chat models","description":"Lists the workspace chat models the caller can read. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"price":{"type":"object","properties":{"input":{"type":"number","minimum":0,"maximum":1000000},"output":{"type":"number","minimum":0,"maximum":1000000},"cache_read":{"type":"number","minimum":0,"maximum":1000000},"cache_write":{"type":"number","minimum":0,"maximum":1000000}},"required":["input","output","cache_read","cache_write"]},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","price","cost_tier","minimum_required_plan","position","created_at","enabled"]}}},"required":["items"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"workspace_chat_models.set_state","summary":"Set workspace chat model state","description":"Set workspace chat model state. Scoped to the organization named by `organization_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","minItems":1,"items":{"type":"string"}},"enabled":{"type":"boolean"}},"required":["scope","model_ids","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["model_id","enabled"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/chat-models/governance":{"get":{"operationId":"workspace_chat_models.governance","summary":"Get workspace chat model governance","description":"Get workspace chat model governance. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"kind","in":"query","required":true,"schema":{"enum":["workspace","team","user"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"gateway_id":{"type":"string"},"provider":{"enum":["gateway","vertex"],"type":"string"},"vision":{"type":"boolean"},"knowledge_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"thinking_options":{"anyOf":[{"type":"object","properties":{"effort":{"enum":["medium","high"],"type":"string"},"disabled":{"type":"boolean"}}},{"type":"null"}]},"cost_tier":{"type":"integer","minimum":1,"maximum":4},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"position":{"type":"number"},"created_at":{"type":"string"},"preference_position":{"anyOf":[{"type":"number"},{"type":"null"}]},"position_from":{"anyOf":[{"enum":["workspace","team","user"],"type":"string"},{"type":"null"}]},"state":{"enum":["off","inherit"],"type":"string"},"locked":{"type":"boolean"},"locked_by":{"anyOf":[{"enum":["workspace","team","admin"],"type":"string"},{"type":"null"}]}},"required":["id","codename","name","owner","description","gateway_id","provider","vision","knowledge_cutoff","thinking_options","cost_tier","minimum_required_plan","position","created_at","preference_position","position_from","state","locked","locked_by"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/chat-models/position":{"put":{"operationId":"workspace_chat_models.set_position","summary":"Set workspace chat model positions","description":"Set workspace chat model positions. Scoped to the organization named by `organization_id`.","tags":["Workspace chat models"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"anyOf":[{"type":"object","properties":{"kind":{"const":"workspace"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"team"},"team_id":{"type":"string","format":"uuid"}},"required":["kind","team_id"]},{"type":"object","properties":{"kind":{"const":"user"},"user_id":{"type":"string","pattern":"^user_"}},"required":["kind","user_id"]}]},"model_ids":{"type":"array","maxItems":500,"items":{"type":"string"}}},"required":["scope","model_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"model_ids":{"type":"array","items":{"type":"string"}}},"required":["model_ids"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organization_id}/activity":{"get":{"operationId":"activity.list","summary":"List activity","description":"Lists the activity the caller can read. Scoped to the organization named by `organization_id`.","tags":["Activity"],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","pattern":"^org_"},"example":"org_abc123"},{"name":"categories","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"actors","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"teams","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"media","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"enum":["generation.ran","asset.uploaded","asset.trashed","chat.ran","chat.created","chat.trashed","canvas.created","canvas.trashed","connector.created","connector.deleted","credit.transaction","credit.spent","member.joined","invitation.sent","workspace.imported","project.created","project.trashed","access.granted","project.asset_linked","project.chat_linked","project.canvas_linked","project.skill_linked","team.created","team.deleted","team.member_added","team.member_removed","api_key.created","api_key.revoked"],"type":"string"},"category":{"enum":["generation","content","credit","member"],"type":"string"},"event_at":{"type":"string"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_key":{"type":"string"},"legacy_source":{"anyOf":[{"enum":["mod","dual"],"type":"string"},{"type":"null"}]},"generation":{"type":"object","properties":{"status":{"enum":["pending","running","completed","failed"],"type":"string"},"output_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"media":{"anyOf":[{"enum":["text","image","video","audio","3d"],"type":"string"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","url"]}}},"required":["status","output_count","duration_ms","model_name","media","prompt","credits","outputs"]},"chat_run":{"type":"object","properties":{"status":{"enum":["completed","failed","declined","partial","unknown"],"type":"string"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"object","properties":{"completed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"declined":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["completed","failed","declined"]}},"required":["status","credits","conversation_id","tools"]},"asset":{"type":"object","properties":{"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","url"]},"credit":{"type":"object","properties":{"type":{"enum":["subscription","purchase","free_refill","gift","welcome_gift","claim","refunded_usage","plan_adjustment","usage","expiration","opening_adjustment","refunded_purchase","refunded_subscription","adjustment"],"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"feature":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","amount","feature","description","conversation_id"]},"invitation":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"}},"required":["email","role"]},"import_run":{"type":"object","properties":{"source":{"enum":["mod","dual"],"type":"string"},"status":{"enum":["queued","running","succeeded","failed"],"type":"string"},"members":{"type":"integer","minimum":0,"maximum":9007199254740991},"assets":{"type":"integer","minimum":0,"maximum":9007199254740991},"canvases":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","status","members","assets","canvases"]},"access":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"member_id":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["resource_type","resource_id","member_id","role"]},"project":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"linked_title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","emoji","linked_title"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","member_id"]},"api_key":{"type":"object","properties":{"id":{"type":"string"},"revoked_reason":{"anyOf":[{"enum":["revoked","creator_left"],"type":"string"},{"type":"null"}]}},"required":["id","revoked_reason"]}},"required":["id","action","category","event_at","actor_id","target_id","title"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications":{"get":{"operationId":"notifications.list","summary":"List notifications","description":"Lists the notifications the caller can read.","tags":["Notifications"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"view","in":"query","required":false,"schema":{"enum":["inbox","archived"],"type":"string","default":"inbox"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"share"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"workspace_share"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]}]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"unseen_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","next_cursor","unseen_count"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications/{notification_id}":{"patch":{"operationId":"notifications.update","summary":"Update notification","description":"Updates a notification and returns the updated row. Scoped to the notification named by `notification_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Notifications"],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"share"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"string"}},"required":["resource_type","resource_id","title","path"]},"created_at":{"type":"string","format":"date-time"},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"type":{"const":"workspace_share"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["id","actor_id","subject","created_at","seen_at","read_at","archived_at","type","role"]}]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications/mark":{"post":{"operationId":"notifications.mark","summary":"Mark notification","description":"Mark notification.","tags":["Notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"state":{"enum":["seen","read","archived"],"type":"string"},"through_id":{"type":"string","format":"uuid"},"subject":{"type":"object","properties":{"resource_type":{"enum":["asset","chat_conversation","canvas","project","scheduled_task","skill"],"type":"string"},"resource_id":{"type":"string","format":"uuid"}},"required":["resource_type","resource_id"]}},"required":["organization_id","state"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/notifications/preferences":{"get":{"operationId":"notifications.get_preferences","summary":"Get notification preferences","description":"Get notification preferences.","tags":["Notifications"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"object","propertyNames":{"enum":["share","workspace_share"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["email"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"notifications.update_preferences","summary":"Update notification preferences","description":"Update notification preferences. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"email":{"type":"object","propertyNames":{"enum":["share","workspace_share"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["organization_id","email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"object","propertyNames":{"enum":["share","workspace_share"],"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["email"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/tools":{"get":{"operationId":"tools.list","summary":"List tools","description":"Lists the tools the caller can read.","tags":["Tools"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^user_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"can_manage_tools":{"type":"boolean"},"can_create_connectors":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"transport":{"enum":["http","sse"],"type":"string"},"auth_kind":{"enum":["clerk","mcp_oauth","bearer","slack_oauth"],"type":"string"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"client_env_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"catalog":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"catalog_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalog_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","codename","organization_id","label","description","url","transport","auth_kind","provider","scopes","client_env_prefix","enabled","catalog","catalog_fingerprint","catalog_at","created_by_id","deleted_at","deleted_by_id","created_at","updated_at","state","can_edit","can_delete"]}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"codename":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["built-in","custom","community"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_shortcut_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"listing_version":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"listing_edited_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"resources":{"type":"object","properties":{"scripts":{"type":"number"},"references":{"type":"number"},"assets":{"type":"number"}},"required":["scripts","references","assets"]},"state":{"type":"object","properties":{"workspace_enabled":{"type":"boolean"},"user_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"effective":{"type":"boolean"}},"required":["workspace_enabled","user_enabled","effective"]},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"shared":{"type":"boolean"},"verified":{"type":"boolean"}},"required":["id","codename","organization_id","source","name","description","author","project_scoped","visibility","workspace_role","created_by_id","mod_shortcut_id","listing_id","listing_version","listing_edited_at","deleted_at","deleted_by_id","created_at","updated_at","resources","state","can_edit","can_delete","shared","verified"]}}},"required":["can_manage_tools","can_create_connectors","connectors","skills"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tools/{tool_kind}/{tool_id}":{"patch":{"operationId":"tools.set_state","summary":"Set tool state","description":"Set tool state. Scoped to the tool named by `tool_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Tools"],"parameters":[{"name":"tool_kind","in":"path","required":true,"schema":{"enum":["connector","skill"],"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"scope":{"enum":["workspace","user"],"type":"string"},"enabled":{"type":"boolean"},"user_id":{"type":"string","pattern":"^user_"}},"required":["organization_id","scope","enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{doc_id}/access":{"get":{"operationId":"documents.get_access","summary":"Get document access","description":"Get document access. Scoped to the doc named by `doc_id`.","tags":["Documents"],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["asset","project"],"type":"string"},"can_write":{"type":"boolean"}},"required":["kind","can_write"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects":{"get":{"operationId":"projects.list","summary":"List projects","description":"Lists the projects the caller can read.","tags":["Projects"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"slug","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"can_archive":{"type":"boolean"},"can_leave":{"type":"boolean"},"shared":{"type":"boolean"},"people_count":{"type":"number"},"asset_count":{"type":"number"},"chat_count":{"type":"number"},"canvas_count":{"type":"number"},"skill_count":{"type":"number"},"people_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at","can_edit","can_delete","can_archive","can_leave","shared","people_count","asset_count","chat_count","canvas_count","skill_count","people_previews","created_by"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"projects.create","summary":"Create project","description":"Creates a project and returns the created row.","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"title":{"type":"string","minLength":1,"maxLength":120},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"slug":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"},"visibility":{"enum":["private","workspace"],"type":"string"},"workspace_role":{"enum":["viewer","editor"],"type":"string"},"grants":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"user_id":{"type":"string","pattern":"^user_"},"role":{"enum":["viewer","editor"],"type":"string"}},"required":["user_id","role"]}}},"required":["organization_id","title"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]},"knowledge_skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"files":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]}},"required":["id","name","description","body","files"]}},"required":["project"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/projects/accounts":{"get":{"operationId":"projects.accounts","summary":"List project accounts","description":"List project accounts.","tags":["Projects"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","minLength":1,"maxLength":40},"handle":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri"},"project_title":{"type":"string"}},"required":["platform","handle","project_title"],"additionalProperties":false}}},"required":["accounts"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}":{"get":{"operationId":"projects.get","summary":"Get project","description":"Returns a single project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"can_archive":{"type":"boolean"},"can_leave":{"type":"boolean"},"shared":{"type":"boolean"},"people_count":{"type":"number"},"asset_count":{"type":"number"},"chat_count":{"type":"number"},"canvas_count":{"type":"number"},"skill_count":{"type":"number"},"people_previews":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"image_url":{"type":"string"}},"required":["user_id","image_url"]}},"created_by":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image_url":{"type":"string"}},"required":["id","first_name","last_name","email","image_url"]},{"type":"null"}]}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at","can_edit","can_delete","can_archive","can_leave","shared","people_count","asset_count","chat_count","canvas_count","skill_count","people_previews","created_by"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"projects.update","summary":"Update project","description":"Updates a project and returns the updated row. Scoped to the project named by `project_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"emoji":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}},"required":["project"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"projects.delete","summary":"Delete project","description":"Deletes a project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"permanent":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/restore":{"post":{"operationId":"projects.restore","summary":"Restore project","description":"Restore project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/archive":{"post":{"operationId":"projects.archive","summary":"Archive project","description":"Archive project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/unarchive":{"post":{"operationId":"projects.unarchive","summary":"Unarchive project","description":"Unarchive project. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"knowledge_skill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","organization_id","created_by_id","slug","title","emoji","description","visibility","workspace_role","knowledge_skill_id","mod_source_id","metadata","deleted_at","deleted_by_id","archived_at","archived_by_id","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/assets":{"get":{"operationId":"projects.assets.list","summary":"List project assets","description":"Lists the project assets the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"types","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"type":{"enum":["image","video","audio","document","text","transcript","3d"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"upload_file_state":{"anyOf":[{"enum":["in_progress","success","error"],"type":"string"},{"type":"null"}]},"enrichment_state":{"anyOf":[{"enum":["ignored","pending","in_progress","success","error"],"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"color":{"anyOf":[{"enum":["red","orange","yellow","green","blue","purple","pink","gray"],"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{"anyOf":[{},{"type":"null"}]}}]},{"type":"null"}]},"generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"origin_canvas_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mod_transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dual_media_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"removable":{"type":"boolean"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","type","title","mime_type","url","content","upload_file_state","enrichment_state","visibility","workspace_role","color","metadata","generation_id","origin_conversation_id","origin_canvas_id","mod_transcript_id","mod_asset_id","mod_source_id","dual_media_id","deleted_at","deleted_by_id","created_at","updated_at","removable","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"projects.assets.add","summary":"Add project asset","description":"Add project asset. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid"}},"required":["asset_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/assets/{asset_id}":{"delete":{"operationId":"projects.assets.remove","summary":"Remove project asset","description":"Deletes a project asset. Scoped to the project named by `project_id`, and the asset named by `asset_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/conversations":{"get":{"operationId":"projects.conversations.list","summary":"List project conversations","description":"Lists the project conversations the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string"},"created_by_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active_leaf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"forked_from_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_count":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"active_run_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active_workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mod_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","organization_id","created_by_id","title","visibility","workspace_role","project_id","active_leaf_id","schedule_id","forked_from_conversation_id","message_count","last_message_at","active_run_id","active_run_at","active_workflow_run_id","mod_conversation_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"projects.conversations.add","summary":"Add project conversation","description":"Add project conversation. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid"},"share_history":{"const":true}},"required":["conversation_id","share_history"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/conversations/{conversation_id}":{"delete":{"operationId":"projects.conversations.remove","summary":"Remove project conversation","description":"Deletes a project conversation. Scoped to the project named by `project_id`, and the conversation named by `conversation_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/canvases":{"get":{"operationId":"projects.canvases.list","summary":"List project canvases","description":"Lists the project canvases the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"workspace_role":{"enum":["viewer","editor","owner"],"type":"string"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"dual_board_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deleted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"shared":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["id","owner_id","organization_id","name","description","emoji","color","thumbnail_url","visibility","workspace_role","last_activity_at","dual_board_id","deleted_at","deleted_by_id","created_at","updated_at","shared","can_edit","can_delete"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"projects.canvases.add","summary":"Add project canvas","description":"Add project canvas. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"canvas_id":{"type":"string","format":"uuid"}},"required":["canvas_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/canvases/{canvas_id}":{"delete":{"operationId":"projects.canvases.remove","summary":"Remove project canvas","description":"Deletes a project canvas. Scoped to the project named by `project_id`, and the canvas named by `canvas_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/skills":{"get":{"operationId":"projects.skills.list","summary":"List project skills","description":"Lists the project skills the caller can read. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"source":{"enum":["built-in","custom","community"],"type":"string"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_scoped":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","x-native-type":"date"},"updated_at":{"type":"string","format":"date-time","x-native-type":"date"},"file_paths":{"type":"array","items":{"type":"string"}},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"is_knowledge":{"type":"boolean"}},"required":["id","name","description","source","author","created_by_id","project_scoped","created_at","updated_at","file_paths","can_edit","can_delete","is_knowledge"]}}},"required":["skills"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"projects.skills.add","summary":"Add project skill","description":"Add project skill. Scoped to the project named by `project_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skill_id":{"type":"string","format":"uuid"}},"required":["skill_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{project_id}/skills/{skill_id}":{"delete":{"operationId":"projects.skills.remove","summary":"Remove project skill","description":"Deletes a project skill. Scoped to the project named by `project_id`, and the skill named by `skill_id`.","tags":["Projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-9b3f-7f25-8c07-5e2d7b14a9c6"},{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{asset_id}/projects":{"get":{"operationId":"projects.for_asset","summary":"List projects for asset","description":"List projects for asset. Scoped to the asset named by `asset_id`.","tags":["Projects"],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-3d71-7c02-9a44-2b7e5c81d0a3"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"via":{"anyOf":[{"type":"object","properties":{"kind":{"enum":["chat","canvas"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title"]},{"type":"null"}]}},"required":["id","slug","title","emoji","via"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{conversation_id}/projects":{"get":{"operationId":"projects.for_chat","summary":"List projects for conversation","description":"List projects for conversation. Scoped to the conversation named by `conversation_id`.","tags":["Projects"],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-5f18-7d63-b016-8c4a9e2f7b51"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/canvases/{canvas_id}/projects":{"get":{"operationId":"projects.for_canvas","summary":"List projects for canvas","description":"List projects for canvas. Scoped to the canvas named by `canvas_id`.","tags":["Projects"],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"0191e5a2-7a29-7e14-9b8d-4f1c6a03e8d2"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{skill_id}/projects":{"get":{"operationId":"projects.for_skill","summary":"List projects for skill","description":"List projects for skill. Scoped to the skill named by `skill_id`.","tags":["Projects"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"brand-voice"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","emoji"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models/public":{"get":{"operationId":"models.public_list","summary":"Public model list","description":"Public model list.","tags":["Models"],"parameters":[{"name":"language","in":"query","schema":{"enum":["en","es","pt"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"codename":{"type":"string"},"name":{"type":"string"},"maker":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"enum":["google","openai","anthropic","elevenlabs","blackforestlabs","minimax","bytedance","kuaishou","recraft","alibaba","xai","spacexai","zai","mistral","deepseek","typesafeai","moonshotai","krea","ideogram","lightricks","pixverse","pruna","veed","imagineart","clarity","reve","firered","meta","topaz","endless"],"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"enum":["image","video","audio","chat"],"type":"string"},"minimum_required_plan":{"anyOf":[{"enum":["hobby","basic","pro","business"],"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"anyOf":[{"type":"object","properties":{"per":{"enum":["image","video","audio"],"type":"string"},"credits":{"type":"number","minimum":0},"from":{"type":"boolean"}},"required":["per","credits","from"]},{"type":"object","properties":{"per":{"const":"tokens"},"input":{"type":"number","minimum":0},"output":{"type":"number","minimum":0}},"required":["per","input","output"]}]},{"type":"null"}]},"added_at":{"type":"string"},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"copy":{"anyOf":[{"type":"object","properties":{"tagline":{"type":"string","minLength":1,"maxLength":90},"summary":{"type":"string","minLength":1,"maxLength":155},"about":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"string","minLength":1}},"best_for":{"type":"array","maxItems":6,"items":{"type":"string","minLength":1,"maxLength":120}},"specs":{"type":"array","maxItems":8,"items":{"type":"object","properties":{"key":{"enum":["context_window","max_output","inputs","outputs","resolution","duration","references","audio","languages","editing"],"type":"string"},"value":{"type":"string","minLength":1,"maxLength":80}},"required":["key","value"]}},"faq":{"type":"array","maxItems":6,"items":{"type":"object","properties":{"q":{"type":"string","minLength":1},"a":{"type":"string","minLength":1}},"required":["q","a"]}}},"required":["tagline","summary","about","best_for","specs","faq"]},{"type":"null"}],"default":null},"copy_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["codename","name","maker","description","kind","minimum_required_plan","price","added_at"]}}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"post":{"operationId":"search.web","summary":"Search the web","description":"Ranked web results for a query through Exa — title, URL, a short snippet and the captioned photos found on each page. Charged as one flat call; a filtered search that returns nothing is retried once without its filters at no extra charge. A search scoped to a social platform is refused (400) with the social operations that read it.","tags":["Search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this search, for the ledger. Every call that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"query":{"type":"string","minLength":1,"description":"The search query, phrased as you'd type it into a search engine. For pictures, search the subject together with its qualifier in the language the sources use; appending 'photos' only ranks stock libraries."},"num_results":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"How many results to return (max 10)."},"category":{"enum":["publication","news","personal site","financial report"],"type":"string","description":"Optional focus area — narrows results to one content type, so only set it when the query targets that exact type: 'news' for recent articles, 'publication' for academic work, 'financial report' for filings, 'personal site' for blogs. Leave it UNSET for how-tos, documentation, support articles, or general questions — a category will miss those and return nothing."},"time_range":{"enum":["day","week","month","year"],"type":"string","description":"Only return pages published within this window back from today."},"include_domains":{"type":"array","items":{"type":"string"},"description":"Restrict results to these domains (e.g. ['nasa.gov'])."},"exclude_domains":{"type":"array","items":{"type":"string"},"description":"Drop results from these domains."}},"required":["organization_id","query"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"published_date":{"type":"string"},"author":{"type":"string"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"caption":{"type":"string"}},"required":["url"]}},"snippet":{"type":"string"}},"required":["title","url"]}},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["summary","results","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/search/operations":{"get":{"operationId":"search.operations","summary":"List the search operations","description":"The web search operations with their descriptions and input JSON Schemas, and the flat price of one call in whole credits.","tags":["Search"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"credits_per_call":{"type":"integer","minimum":0,"maximum":9007199254740991},"operations":{"type":"array","items":{"type":"object","properties":{"name":{"enum":["web_search","read_url"],"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","description","input_schema"]}}},"required":["credits_per_call","operations"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/read-url":{"post":{"operationId":"search.read_url","summary":"Read web pages","description":"The full text of up to ten known URLs through Exa, each capped at 200,000 characters, with a short preview. Charged as one flat call. A social platform URL is refused (400) with the social operations that read it.","tags":["Search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this search, for the ledger. Every call that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"urls":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","format":"uri"},"description":"The URLs to read (max 10)."}},"required":["organization_id","urls"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"type":"string"}},"required":["url","title","text","chars","preview"]}},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["summary","pages","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/operations":{"get":{"operationId":"social.operations","summary":"List social operations","description":"The social operations this workspace can run: each one's name, network, description and the JSON Schema of its input and output. Call one with `POST /social/{operation}`.","tags":["Social"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"name":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"network":{"enum":["instagram","x","tiktok","youtube","facebook","linkedin","reddit"],"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","description","input_schema","output_schema"]}}},"required":["operations"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social/trends":{"get":{"operationId":"social.trends","summary":"Get trending topics","description":"What's trending on X for a location — the Radar feed. Requires the Radar feature; not charged.","tags":["Social"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"name":"woeid","in":"query","required":false,"schema":{"type":"number","description":"Yahoo WOEID of the location. Omitted: the caller's country, else worldwide."},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}}},"required":["woeid","trends"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social/trends/public/{region}":{"get":{"operationId":"social.public_trends","summary":"Get public trending topics","description":"What's trending on X in a country, read from snapshots taken every few hours, with the last 24 hours of history. Public, no authentication.","tags":["Social"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"enum":["worldwide","argentina","brazil","canada","chile","colombia","dominican-republic","ecuador","guatemala","mexico","panama","peru","puerto-rico","united-states","venezuela","austria","belarus","belgium","denmark","france","germany","greece","ireland","italy","latvia","netherlands","norway","poland","portugal","russia","spain","sweden","switzerland","turkey","ukraine","united-kingdom","india","indonesia","japan","malaysia","pakistan","philippines","singapore","south-korea","thailand","vietnam","bahrain","israel","jordan","kuwait","lebanon","oman","qatar","saudi-arabia","united-arab-emirates","algeria","egypt","ghana","kenya","nigeria","south-africa","australia","new-zealand"],"type":"string","description":"Region slug, e.g. `argentina` or `worldwide`."}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"region":{"type":"string"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}},"timeline":{"type":"array","items":{"type":"object","properties":{"captured_at":{"type":"string"},"names":{"type":"array","items":{"type":"string"}}},"required":["captured_at","names"]}},"longest":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"snapshots":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","snapshots"]}}},"required":["region","captured_at","trends","timeline","longest"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social/tiktok-trends/public/{region}":{"get":{"operationId":"social.public_tiktok_trends","summary":"Get public trending TikTok videos","description":"The most played local videos in a country's TikTok trending feed over the last 24 hours, read from snapshots taken every few hours. Public, no authentication.","tags":["Social"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"enum":["argentina","brazil","canada","chile","colombia","dominican-republic","egypt","indonesia","japan","malaysia","mexico","peru","philippines","saudi-arabia","thailand","turkey","united-kingdom","united-states","venezuela","vietnam"],"type":"string","description":"Country slug, e.g. `argentina`."}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"region":{"type":"string"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"cover_url":{"type":"string"}}}},"longest":{"type":"array","items":{"type":"object","properties":{"video":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"cover_url":{"type":"string"}}},"snapshots":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["video","snapshots"]}},"sounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"video_count":{"type":"number"},"creators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"original":{"type":"boolean"}},"required":["id","creators","original"]}},"hashtags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"creators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","creators"]}}},"required":["region","captured_at","videos","longest","sounds","hashtags"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social/{operation}/quote":{"post":{"operationId":"social.quote","summary":"Quote a social operation","description":"The most requests and credits a call with this input can cost. Nothing runs and nothing is charged; the same call is never charged more than this.","tags":["Social"],"parameters":[{"name":"operation","in":"path","required":true,"schema":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"example":"x_search"},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{},"description":"The operation's input, validated against its own schema."}},"required":["organization_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"max_requests":{"type":"integer","minimum":1,"maximum":9007199254740991},"max_credits":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","max_requests","max_credits"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social/instagram_profile":{"post":{"operationId":"social.instagram_profile","summary":"Instagram profile","description":"Look up an Instagram profile by @username. Use whenever the user asks about follower counts, bio, verification, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_user_posts":{"post":{"operationId":"social.instagram_user_posts","summary":"Instagram user posts","description":"Use when the user asks for top/most-liked/most-viewed/most-commented posts (e.g. 'top post of the week'). Returns recent Instagram posts (newest first) with engagement counts; sort and filter by `taken_at` (Unix seconds). For a VIDEO or date-range question prefer `instagram_user_reels`, which pages back more reliably; use this one for photos and carousels or a mixed feed. Also read this BEFORE writing copy in an account's voice: `caption_text` carries the voice and the engagement counts carry what actually landed, so the default `limit` of 12 is usually enough, and one read per account per conversation covers a whole thread of revisions. If a date window you chose returns no items, retry once without date filters before drafting; preserve any source period the user requested. If results are still empty or thin, say so — don't fall back to `web_search` and write from the open web, which is what produces the generic voice an account rejects.\n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":12,"description":"How many recent posts to return (max 100). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","user_id","coverage","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_user_reels":{"post":{"operationId":"social.instagram_user_reels","summary":"Instagram user reels","description":"Get an Instagram account's reels with view counts (`play_count`), likes and comments. Prefer this over `instagram_user_posts` for ANY question about video performance or covering a date range: it is the only Instagram feed that pages back reliably AND carries a true view count on every item. It sees ONLY reels — for photos and carousels use `instagram_user_posts`. If a date window you chose returns no items, retry once without date filters before drafting; preserve any source period the user requested.\n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":24,"description":"How many reels to return (max 200). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","user_id","coverage","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_user_stories":{"post":{"operationId":"social.instagram_user_stories","summary":"Instagram user stories","description":"Fetch an account's currently active Instagram stories (the last 24h) by @username. Stories expire after 24h and engagement on third-party accounts is private, so results carry timing and content (pass `image_url` to `analyze_image`), not like/view counts.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"taken_at":{"type":"number"},"expiring_at":{"type":"number"},"media_type":{"type":"number"},"video_duration":{"type":"number"},"caption_text":{"type":"string"},"image_url":{"type":"string"}}}}},"required":["summary","username","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_user_highlights":{"post":{"operationId":"social.instagram_user_highlights","summary":"Instagram user highlights","description":"List an account's Instagram highlights (the permanent story collections pinned on the profile) by @username. Returns each highlight's id (`pk`), title, story count, and cover image; fetch the stories inside one with `instagram_highlight_stories`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Instagram handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"media_count":{"type":"number"},"created_at":{"type":"number"},"cover_url":{"type":"string"}}}}},"required":["summary","username","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_highlight_stories":{"post":{"operationId":"social.instagram_highlight_stories","summary":"Instagram highlight stories","description":"Fetch the stories inside one Instagram highlight by its id (the `pk` from `instagram_user_highlights`). Highlight stories don't expire, but engagement on third-party accounts is private, so results carry timing and content (pass `image_url` to `analyze_image`), not like/view counts.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"highlight_id":{"type":"string","minLength":1,"description":"Highlight id — the `pk` from `instagram_user_highlights` (numeric string; `highlight:<pk>` also accepted)"}},"required":["highlight_id"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"highlight_id":{"type":"string"},"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"taken_at":{"type":"number"},"expiring_at":{"type":"number"},"media_type":{"type":"number"},"video_duration":{"type":"number"},"caption_text":{"type":"string"},"image_url":{"type":"string"}}}}},"required":["summary","highlight_id","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_post":{"post":{"operationId":"social.instagram_post","summary":"Instagram post","description":"Fetch a single Instagram post by URL. Returns engagement metrics (likes, comments, plays/views), caption, and the author.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Instagram post URL (https://www.instagram.com/p/...)"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","description":"One-line result, for the reader."},"video_url":{"type":"string","description":"The video's mp4 (reels and videos only). Pass to `analyze_video` to see what it shows; signed, expires."},"author":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"}}}},"required":["summary","author"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_post_comments":{"post":{"operationId":"social.instagram_post_comments","summary":"Instagram post comments","description":"Get the comments on an Instagram post by URL, newest pages first, up to `limit`. Use when the user asks about comments, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Instagram post URL (https://www.instagram.com/p/...)"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"media_id":{"type":"string"},"truncated":{"type":"boolean"},"comments":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"created_at":{"type":"number"},"like_count":{"type":"number"},"text":{"type":"string"},"user":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"username":{"type":"string"},"full_name":{"type":"string"},"biography":{"type":"string"},"is_verified":{"type":"boolean"},"is_private":{"type":"boolean"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"media_count":{"type":"number"},"category":{"type":"string"},"external_url":{"type":"string"},"profile_pic_url":{"type":"string"}}}},"required":["user"]}}},"required":["summary","media_id","truncated","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_search":{"post":{"operationId":"social.instagram_search","summary":"Instagram search","description":"Search Instagram REELS by keyword — what people, not just the official account, are posting about an event, brand, person or topic. Results are ranked by relevance, not date, and match captions and hashtags: a reel whose caption never names the term won't appear. For social listening, run a few queries (the event name, the official @account, the featured people together with the event) and read the official account's own feed with `instagram_user_reels`. Reels only — photos and carousels come from `instagram_hashtag_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text; a #hashtag also works as a keyword."},"max_items":{"type":"integer","minimum":1,"maximum":60,"default":24,"description":"Maximum reels to return (paginated upstream, max 60)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"string","description":"The poster's @handle."}}}}},"required":["summary","query","count","truncated","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/instagram_hashtag_posts":{"post":{"operationId":"social.instagram_hashtag_posts","summary":"Instagram hashtag posts","description":"Get an Instagram hashtag's top posts — photos, carousels and reels. Instagram's own ranking, not chronological, and it mixes in years-old posts and unrelated uses of the same tag: check each post's `taken_at` and caption before counting it. For reels about a topic, `instagram_search` is more on-topic.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"hashtag":{"type":"string","minLength":1,"description":"Hashtag name, with or without the leading #."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many posts to return (max 90)."}},"required":["hashtag"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"hashtag":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"string"},"id":{"type":"string"},"code":{"type":"string"},"media_type":{"type":"number"},"product_type":{"type":"string"},"taken_at":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"play_count":{"type":"number"},"view_count":{"type":"number"},"permalink":{"type":"string"},"caption_text":{"type":"string"},"image_url":{"type":"string"},"carousel_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"string","description":"The poster's @handle."}}}}},"required":["summary","hashtag","count","truncated","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_profile":{"post":{"operationId":"social.tiktok_profile","summary":"TikTok profile","description":"Look up a TikTok profile by @username. Use whenever the user asks about follower counts, bio, verification, total likes, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"TikTok handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"sec_uid":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"url":{"type":"string"},"bio":{"type":"string"},"verified":{"type":"boolean"},"private":{"type":"boolean"},"region":{"type":"string"},"follower_count":{"type":"number"},"following_count":{"type":"number"},"like_count":{"type":"number"},"video_count":{"type":"number"},"image_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_user_posts":{"post":{"operationId":"social.tiktok_user_posts","summary":"TikTok user posts","description":"Get a TikTok account's videos with engagement counts (plays, likes, comments, shares, saves), hashtags, and the sound each video uses (`music.id` feeds `tiktok_music_posts`). For a date range, pass `since` and the walk pages back until it reaches that date — do NOT try to cover a range with a big `max_items`.\n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For comparing several accounts at once, prefer `tiktok_trend_scan`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"TikTok handle, without the leading @"},"max_items":{"type":"integer","minimum":1,"maximum":70,"default":30,"description":"How many posts to return (max 70). Ignored when `since` is set."},"sort":{"enum":["recent","popular"],"type":"string","default":"recent","description":"'recent' = newest first (monitoring); 'popular' = the account's top videos."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"sort":{"enum":["recent","popular"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","username","sort","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_post":{"post":{"operationId":"social.tiktok_post","summary":"TikTok post","description":"Fetch a single TikTok video by URL (or bare video id). Returns engagement metrics (plays, likes, comments, shares, saves), the caption, hashtags, the author, the sound it uses (`music.id` feeds `tiktok_music_posts`), and a direct `video_url` (TikTok refuses every download of it, so it CANNOT be analyzed — describe the video from the caption and metrics, or ask the user to upload the file). Call this directly for any tiktok.com video URL — those pages are client-rendered, so `read_url`/`web_search` won't load them.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full TikTok video URL (https://www.tiktok.com/@user/video/123...) or the bare numeric video id."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}},"summary":{"type":"string","description":"One-line result, for the reader."},"video_url":{"type":"string"}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_post_comments":{"post":{"operationId":"social.tiktok_post_comments","summary":"TikTok post comments","description":"Get the comments on a TikTok video by URL (or bare video id). Use when the user asks about comments, reactions, or sentiment on a specific video.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full TikTok video URL (https://www.tiktok.com/@user/video/123...) or the bare numeric video id."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"video_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"comment_id":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"}}}},"required":["author"]}}},"required":["summary","video_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_search":{"post":{"operationId":"social.tiktok_search","summary":"TikTok search","description":"Search TikTok for public videos (or accounts) by topic, keyword, or hashtag. Use for trend analysis, monitoring conversations, or finding which videos/creators are active on a theme. Use `tiktok_user_posts` for one account's own feed and `tiktok_hashtag_posts` when the query is exactly one hashtag.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text."},"type":{"enum":["videos","accounts"],"type":"string","default":"videos","description":"'videos' = matching videos (default); 'accounts' = matching creator accounts (e.g. to build a monitoring list)."},"region":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Two-letter country code to geo-scope video results to that market (e.g. AR, MX, BR). Videos only; each result carries its own `region`."},"max_items":{"type":"integer","minimum":1,"maximum":60,"default":20,"description":"Maximum results to return (paginated upstream, max 60)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"type":{"enum":["videos","accounts"],"type":"string"},"region":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"url":{"type":"string"},"bio":{"type":"string"},"follower_count":{"type":"number"},"verified":{"type":"boolean"}}}}},"required":["summary","query","type","count"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_hashtag_posts":{"post":{"operationId":"social.tiktok_hashtag_posts","summary":"TikTok hashtag posts","description":"Get a TikTok hashtag's stats (total videos, total views) plus its current videos. Use to size a hashtag trend and see what's being posted under it; compare each post's `created_at` to spot when the trend started accelerating.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"hashtag":{"type":"string","minLength":1,"description":"Hashtag name, with or without the leading #."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many videos to return (max 90)."}},"required":["hashtag"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"hashtag":{"type":"string"},"hashtag_id":{"type":"string"},"description":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","hashtag","hashtag_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_music_posts":{"post":{"operationId":"social.tiktok_music_posts","summary":"TikTok music posts","description":"Get the TikTok videos that use one sound/music, plus the sound's total video count — the fastest way to confirm an audio trend. TikTok-only — the other platforms have no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"music":{"type":"string","minLength":1,"description":"Music id (the `music.id` from another TikTok tool's result) or a tiktok.com/music/... URL."},"max_items":{"type":"integer","minimum":1,"maximum":90,"default":30,"description":"How many videos to return (max 90)."}},"required":["music"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"music_id":{"type":"string"},"title":{"type":"string"},"music_author":{"type":"string"},"original":{"type":"boolean"},"video_count":{"type":"number"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}}}},"required":["summary","music_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_trending":{"post":{"operationId":"social.tiktok_trending","summary":"TikTok trending","description":"TikTok trend charts: 'videos' = the live trending feed for a country (full video items with engagement, sound, and hashtags); 'songs' = commercial sounds ranked by use (each with `video_count` and a `music_id` for `tiktok_music_posts`); 'ads' = Creative Center's top ad creatives by country and period. For trend detection over specific accounts/hashtags/topics, use `tiktok_trend_scan`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"category":{"enum":["videos","songs","ads"],"type":"string","description":"'videos' = trending feed per country; 'songs' = trending commercial sounds (global); 'ads' = top ad creatives (per country)."},"country":{"type":"string","pattern":"^[A-Za-z]{2}$","default":"US","description":"Two-letter country code (e.g. US, MX, BR, AR) for videos/ads. Songs are global."},"period":{"enum":["7","30","180"],"type":"string","default":"7","description":"Ads only: trailing window in days ('7', '30', or '180')."},"sort":{"enum":["like","ctr","impression","cvr"],"type":"string","default":"like","description":"Ads only: rank by 'like' (engagement, default), 'ctr', 'impression' (reach), or 'cvr'."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":20,"description":"How many entries to return (max 20)."}},"required":["category"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"category":{"enum":["videos","songs","ads"],"type":"string"},"country":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"region":{"type":"string"},"created_at":{"type":"string"},"duration_seconds":{"type":"number"},"play_count":{"type":"number"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"share_count":{"type":"number"},"save_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"music":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"original":{"type":"boolean"}}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string"},"verified":{"type":"boolean"}}},"image_url":{"type":"string"},"slide_image_urls":{"type":"array","items":{"type":"string"}}}},{"type":"object","properties":{"music_id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"duration_seconds":{"type":"number"},"video_count":{"type":"number"},"image_url":{"type":"string"}}},{"type":"object","properties":{"ad_id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"string"},"like_count":{"type":"number"},"ctr":{"type":"number"},"industry":{"type":"string"},"objective":{"type":"string"},"duration_seconds":{"type":"number"},"image_url":{"type":"string"}}}]}}},"required":["summary","category","count","items"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/tiktok_trend_scan":{"post":{"operationId":"social.tiktok_trend_scan","summary":"TikTok trend scan","description":"Use whenever the user asks what's trending on TikTok — for a country, city, niche, or set of accounts. Scans recent videos from one source (a `region`'s trending feed, a list of `usernames`, a `hashtag`, or a `keyword`) and returns ranked clusters of videos sharing a sound or hashtag, each with distinct-account count (the trend signal), video count, plays, time span, and example URLs. Answers the question from TikTok's own data, so prefer it over web search. Drill into a cluster with `tiktok_music_posts` or `tiktok_hashtag_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"region":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Two-letter country code. Alone = scan that country's trending feed (the direct answer to 'what's trending in <country>'); with `keyword` = geo-scope the keyword scan."},"usernames":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1},"description":"Up to 10 TikTok handles (without @) to scan — e.g. a curated monitoring list. For a bigger list, call in batches and compare."},"hashtag":{"type":"string","minLength":1,"description":"Scan a hashtag's current videos instead (with or without #)."},"keyword":{"type":"string","minLength":1,"description":"Scan video search results for a topic instead."},"max_posts":{"type":"integer","minimum":20,"maximum":120,"default":60,"description":"How many videos to scan across the source (max 120)."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"source":{"type":"string"},"scanned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sounds":{"type":"array","items":{"type":"object","properties":{"music_id":{"type":"string"},"title":{"type":"string"},"music_author":{"type":"string"},"original":{"type":"boolean"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newest_at":{"type":"string"},"oldest_at":{"type":"string"},"total_plays":{"type":"number"},"examples":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"username":{"type":"string"},"created_at":{"type":"string"},"play_count":{"type":"number"}}}}},"required":["music_id","videos","accounts","total_plays","examples"]}},"hashtags":{"type":"array","items":{"type":"object","properties":{"hashtag":{"type":"string"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newest_at":{"type":"string"}},"required":["hashtag","videos","accounts"]}},"categories":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["category","videos","accounts"]}}},"required":["summary","source","scanned","sounds","hashtags","categories"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_profile":{"post":{"operationId":"social.linkedin_profile","summary":"LinkedIn profile","description":"Look up a LinkedIn PERSON profile by public handle. Returns headline, location, follower and connection counts, and open-to-work/hiring status. Use for professional background or audience-size questions about an individual. Route by URL shape: `linkedin.com/in/<slug>` is a person (use this) — `linkedin.com/company/<slug>` is a company (use `linkedin_company`). Pass the bare slug or the full `/in/` URL.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"LinkedIn person handle — the vanity slug from a `linkedin.com/in/<slug>` URL (a full `/in/…` URL is accepted too). For a company page (`linkedin.com/company/<slug>`) use `linkedin_company` instead."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"url":{"type":"string"},"username":{"type":"string"},"urn":{"type":"string"},"name":{"type":"string"},"headline":{"type":"string"},"location":{"type":"string"},"followers":{"type":"number"},"connections":{"type":"number"},"is_open_to_work":{"type":"boolean"},"is_hiring":{"type":"boolean"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_company":{"post":{"operationId":"social.linkedin_company","summary":"LinkedIn company","description":"Look up a LinkedIn COMPANY page by its handle (the slug in linkedin.com/company/<handle>). Returns description, industries, website, follower count, headcount, and headquarters. Use for competitor/brand research. Route by URL shape: `linkedin.com/company/<slug>` (and `/school/<slug>`) is a company (use this) — `linkedin.com/in/<slug>` is a person (use `linkedin_profile`). Pass the bare slug or the full `/company/` URL.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"company":{"type":"string","minLength":1,"description":"Company handle, e.g. 'google' from linkedin.com/company/google (a full `/company/…` or `/school/…` URL is accepted too)."}},"required":["company"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"description":{"type":"string"},"website":{"type":"string"},"industries":{"type":"array","items":{"type":"string"}},"followers":{"type":"number"},"employee_count":{"type":"number"},"headquarter":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_user_posts":{"post":{"operationId":"social.linkedin_user_posts","summary":"LinkedIn user posts","description":"Get a LinkedIn person's recent posts (newest first) with reaction, comment, and repost counts. Use when the user asks what someone has been posting or for their top/most-engaged content (sort client-side). For a company's posts use `linkedin_company_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"LinkedIn person handle — the vanity slug from a `linkedin.com/in/<slug>` URL (a full `/in/…` URL is accepted too). For a company page (`linkedin.com/company/<slug>`) use `linkedin_company` instead."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","username","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_company_posts":{"post":{"operationId":"social.linkedin_company_posts","summary":"LinkedIn company posts","description":"Get a LinkedIn company page's recent posts with engagement counts. Use for brand/competitor content monitoring. For a person use `linkedin_user_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"company":{"type":"string","minLength":1,"description":"Company handle, e.g. 'microsoft' from linkedin.com/company/microsoft (a full `/company/…` URL is accepted too). For a person's posts use `linkedin_user_posts`."},"sort_by":{"enum":["top","recent"],"type":"string","default":"top","description":"'top' for most-engaged, 'recent' for newest first."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["company"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"company":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","company","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_post":{"post":{"operationId":"social.linkedin_post","summary":"LinkedIn post","description":"Fetch a single LinkedIn post by URL, with its top comments. Returns the full text, reaction/comment/repost counts, and the author. Use when the user shares a post link or asks about reactions on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full LinkedIn post URL (e.g. .../feed/update/urn:li:activity:12345) or the activity id."},"comment_limit":{"type":"integer","minimum":0,"maximum":50,"default":20,"description":"How many comments to include (0 to skip; max 50)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}},"summary":{"type":"string","description":"One-line result, for the reader."},"comments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"posted_at":{"type":"string"},"reaction_count":{"type":"number"},"reply_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_search_people":{"post":{"operationId":"social.linkedin_search_people","summary":"LinkedIn search people","description":"Search LinkedIn for people by name, optionally narrowed by job title. Returns profiles with name, headline/title, location, and a canonical profile URL. Use for prospecting, finding decision-makers, or resolving a person to their handle. For people in a role at a company, pass the company as `name` and the role as `title`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Full or display name to search for, e.g. 'Bill Gates'."},"title":{"type":"string","description":"Optional job-title/headline filter, e.g. 'head of marketing'."},"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1,"description":"Result page (1-based)."},"max_items":{"type":"integer","minimum":1,"maximum":10,"default":10,"description":"How many people to return (one page, max 10)."}},"required":["name"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"name":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"location":{"type":"string"}}}}},"required":["summary","name","count","people"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/linkedin_search_posts":{"post":{"operationId":"social.linkedin_search_posts","summary":"LinkedIn search posts","description":"Search LinkedIn for public posts about a topic, brand, or keyword. Use for tracking conversation and professional sentiment. Set `sort_by:'date_posted'` plus `date_posted` for recency-first monitoring. For one account's own posts use the `*_posts` tools.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"description":"The search query, e.g. a brand, product, or topic."},"sort_by":{"enum":["relevance","date_posted"],"type":"string","default":"relevance","description":"'relevance' for best matches, 'date_posted' for the most recent."},"date_posted":{"enum":["any","past_24h","past_week","past_month"],"type":"string","description":"Restrict to posts from the last 24h, week, or month. 'any' (the default) applies no date filter — use it unless the user bounded the period."},"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1,"description":"Result page (1-based)."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many posts to return (at most 20 for a person's posts, 10 for any other list)."}},"required":["keyword"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"keyword":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"posted_at":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"repost_count":{"type":"number"},"reaction_count":{"type":"number"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"headline":{"type":"string"}}}}}}},"required":["summary","keyword","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_channel":{"post":{"operationId":"social.youtube_channel","summary":"YouTube channel","description":"Look up a YouTube channel by handle, URL, or id. Returns title, description, subscriber/video/view counts, country, and links. Use for creator/brand background or audience-size questions. For the channel's uploads use `youtube_channel_videos`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC…)."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"subscribers":{"type":"number"},"subscribers_text":{"type":"string"},"video_count":{"type":"number"},"view_count":{"type":"number"},"country":{"type":"string"},"joined_date":{"type":"string"},"is_live":{"type":"boolean"},"avatar":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_channel_videos":{"post":{"operationId":"social.youtube_channel_videos","summary":"YouTube channel videos","description":"Get a channel's long-form uploads with view counts, length, and publish dates. Use when asked what a channel has posted or for its top/most-viewed videos (`sort_by:'popular'`). For a date range pass `since`: the listing cards are sparse, so each video is then fetched individually to get its date and counts — accurate, but one call per video, so keep the window tight. Pair `since` with `until` and the tool returns a `totals` block computed over exactly that window — quote it, never add up the rows yourself. Read `coverage` before reporting totals. For Shorts use `youtube_channel_shorts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC…)."},"sort_by":{"enum":["newest","popular","oldest"],"type":"string","default":"newest","description":"'newest' first, 'popular' for most-viewed, or 'oldest'."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."},"with_comments":{"type":"boolean","default":false,"description":"Fetch each video's exact comment count. Off by default because it DOUBLES the requests (one extra call per video) — turn it on only when the answer needs comment totals or engagement including comments. Left off, comment counts come back absent, and totals report them as not measured rather than as zero."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","channel","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_channel_playlists":{"post":{"operationId":"social.youtube_channel_playlists","summary":"YouTube channel playlists","description":"Get a channel's playlists (title, video count, thumbnail). Use to understand how a channel organizes its content into series/collections.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC…)."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"video_count":{"type":"number"},"thumbnail":{"type":"string"}}}}},"required":["summary","channel","count","playlists"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_channel_shorts":{"post":{"operationId":"social.youtube_channel_shorts","summary":"YouTube channel shorts","description":"Get a channel's Shorts (short-form vertical videos), separate from its long-form uploads. Use for short-form strategy questions. Shorts cards carry ONLY a view-count string — no date, likes or comments — so a date range or any totals means fetching each Short individually, one call each. Comment counts need `with_comments` (a second call per video); without it they come back absent, NOT zero. \n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For regular videos use `youtube_channel_videos`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel handle (e.g. '@MrBeast' or 'MrBeast'), full channel URL, or channel id (UC…)."},"sort_by":{"enum":["newest","popular","oldest"],"type":"string","default":"newest","description":"'newest' first, 'popular' for most-viewed, or 'oldest'."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."},"with_comments":{"type":"boolean","default":false,"description":"Fetch each video's exact comment count. Off by default because it DOUBLES the requests (one extra call per video) — turn it on only when the answer needs comment totals or engagement including comments. Left off, comment counts come back absent, and totals report them as not measured rather than as zero."}},"required":["channel"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"channel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","channel","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_video":{"post":{"operationId":"social.youtube_video","summary":"YouTube video","description":"Fetch a single YouTube video by URL or id, with its top comments. Returns title, channel, view/like/comment counts, length, and publish date. Use when the user shares a video link or asks about a specific video's engagement. To transcribe a video, use `create_transcript` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Full YouTube video URL (watch, youtu.be, or /shorts/) or the 11-char video id."},"comment_limit":{"type":"integer","minimum":0,"maximum":50,"default":10,"description":"How many top comments to include (0 to skip; max 50)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."},"comments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"author":{"type":"string"},"likes":{"type":"string"},"reply_count":{"type":"number"},"published_at":{"type":"string"},"is_verified":{"type":"boolean"}}}}},"required":["channel","summary","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_search":{"post":{"operationId":"social.youtube_search","summary":"YouTube search","description":"Search YouTube for videos, channels, or playlists by topic or keyword. Set `type` to narrow the result kind, `sort_by:'date'` + `upload_date` for recency-first monitoring, and `duration` to filter video length. For one channel's own uploads use the `youtube_channel_*` tools.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"The search query (topic, keyword, name)."},"type":{"enum":["video","channel","playlist"],"type":"string","default":"video","description":"Restrict results to one kind. Defaults to videos."},"sort_by":{"enum":["relevance","date","views"],"type":"string","default":"relevance","description":"'relevance' (default), 'date' for newest, or 'views' for most-viewed."},"upload_date":{"enum":["any","today","week","month","year"],"type":"string","description":"Restrict videos to those uploaded within this window. Only applies when type is 'video' (ignored for channel/playlist searches). 'any' (the default) applies no date filter — use it unless the user bounded the period."},"duration":{"enum":["under3min","3to20min","over20min"],"type":"string","description":"Filter videos by length. Only applies when type is 'video' (ignored for channel/playlist searches)."},"max_items":{"type":"integer","minimum":1,"maximum":300,"default":20,"description":"How many items to return (max 300; fetched ~48 per upstream page, so large values are slower)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"estimated_results":{"type":"number"},"results":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"},"kind":{"const":"video"}},"required":["channel","kind"]},{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"video_count":{"type":"number"},"thumbnail":{"type":"string"},"kind":{"const":"playlist"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"channel"},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"subscribers_text":{"type":"string"},"thumbnail":{"type":"string"}},"required":["kind"]}]}}},"required":["summary","query","count","results"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/youtube_trending":{"post":{"operationId":"social.youtube_trending","summary":"YouTube trending","description":"Get the top trending YouTube videos for a region, optionally by category (music, games, movies). Use for 'what's hot/trending' research. Returns YouTube's one trending list (up to 50). For a specific topic use `youtube_search`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"geo":{"type":"string","minLength":2,"maxLength":2,"default":"US","description":"ISO 3166 country code, e.g. 'US', 'GB', 'IN'."},"type":{"enum":["now","music","games","movies"],"type":"string","description":"Trending category. Defaults to overall ('now')."},"max_items":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many trending videos to return (max 50 — the list has no further pages)."},"lang":{"type":"string","minLength":2,"maxLength":10,"description":"Original content language as an ISO-639 code (e.g. 'es', 'pt', 'fr'). Pass this when the channel/content is not in English so titles and descriptions come back in the original language instead of YouTube's English auto-translation. Omit for English content."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"geo":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"url":{"type":"string"}}},"published_at":{"type":"string"},"published_text":{"type":"string"},"length":{"type":"string"},"view_count":{"type":"number"},"view_count_text":{"type":"string"},"like_count":{"type":"number"},"comment_count":{"type":"number"},"thumbnail":{"type":"string"}},"required":["channel"]}}},"required":["summary","geo","count","videos"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_page":{"post":{"operationId":"social.facebook_page","summary":"Facebook page","description":"Look up a public Facebook page by URL or slug. Use whenever the user asks about a page's followers, category, contact info, rating, or basic info. Works for pages (brands, businesses, creators) — personal profiles are mostly private.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https://www.facebook.com/nike) or bare slug ('nike')."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"page_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"intro":{"type":"string"},"followers":{"type":"number"},"following":{"type":"number"},"likes":{"type":"number"},"categories":{"type":"array","items":{"type":"string"}},"website":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"rating":{"type":"number"},"verified":{"type":"boolean"},"image_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_page_posts":{"post":{"operationId":"social.facebook_page_posts","summary":"Facebook page posts","description":"Get a public Facebook page's recent posts (newest first) with engagement counts and per-type reaction breakdowns. For a date range, pass `start_date`/`since` — the walk pages back until it reaches that date instead of stopping at a fixed count. This feed yields only ~3 posts per upstream call, so a month costs ~60 calls; if the page posts mostly reels, `facebook_page_reels` covers the same span 3x faster.\n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand. For search across many pages use `facebook_search`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https://www.facebook.com/nike) or bare slug ('nike')."},"max_items":{"type":"integer","minimum":1,"maximum":24,"default":10,"description":"How many recent posts to return (max 24; ~3 fetched per upstream page, so large values are slower). Ignored when `since`/`start_date` is set."},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts on/after this date (YYYY-MM-DD). Also deepens the walk."},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts before this date (YYYY-MM-DD)."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"page_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_page_reels":{"post":{"operationId":"social.facebook_page_reels","summary":"Facebook page reels","description":"Get a public Facebook page's reels (newest first) with play counts, reactions, comments and reshares. Prefer this over `facebook_page_posts` whenever the question is about video/reel performance or covers a date range: it returns 10 items per upstream call against that feed's 3, so the same span costs a third of the requests. It sees ONLY reels — for photos and text posts use `facebook_page_posts`.\n\nFor a date range pass `since` and `until` rather than a large item cap — plus `tz`, the user's timezone, so the days are cut on THEIR calendar. The walk pages back until it reaches that date, and the tool returns a `totals` block (posts, views, likes, comments, engagement_rate) computed over exactly that window. Quote those numbers; never add up the rows yourself. Before reporting a total, read these four fields — each one exists because ignoring it produced a wrong report:\n- `partial: true` — the walk stopped early, so this is a FLOOR, not a measurement. Say so, or re-run; never present it as the period's total.\n- `overlaps` — names a sibling feed returning the SAME pieces. Report one feed or the other; adding both counts every piece twice.\n- `views_metric` — which upstream number `views` came from. Two feeds on one platform can report different values for the same piece, so only compare or combine totals whose `views_metric` matches.\n- `measured_at` — when it was read. Live counts move fast; state it whenever you report a total, and never explain a difference between two runs as a mistake before checking whether the pieces simply gained views between them.\n\nCOVERING MORE THAN ONE ACCOUNT OR FEED: never add these totals in your head. Each result carries a `receipt` — a TSV block with the same five columns on every platform. Paste the receipts into `run_code` and total them there: dedupe on (platform, id) so a piece returned by two feeds is counted once, keep an empty field as missing rather than 0, and only add views across receipts whose `views_metric` matches. Report the code's number, not a retyped one, and hand back the per-piece list so the total can be checked by hand.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"page":{"type":"string","minLength":1,"description":"Facebook page URL (https://www.facebook.com/nike) or bare slug ('nike')."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"How many reels to return (max 100). Ignored when `since` is set."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Page back until posts from this date (YYYY-MM-DD) are reached. Use this when the requested source content is bounded by publication date, instead of raising the item cap. For creative references or account voice, omit date filters unless the user limits the source period; a planning deadline does not limit when references were published. Never pass a far-past date to mean 'everything', and omit it when the user asks for no date filter: every page walked back costs credits."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End of the window (YYYY-MM-DD, inclusive). Pair with `since` to get exact `totals` for a date range instead of summing rows yourself."},"tz":{"type":"string","description":"IANA timezone the date window is cut in (e.g. 'America/Argentina/Buenos_Aires'). Pass the user's timezone from the system prompt whenever you pass `since`/`until` — days cut in the wrong zone shift every piece published late in the evening into the next day. Defaults to UTC."}},"required":["page"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"page_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"object","properties":{"window":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"},"tz":{"type":"string"}}},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"engagement_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"rows_without_views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows_without_comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views_metric":{"type":"string"},"measured_at":{"type":"string"},"partial":{"const":true},"overlaps":{"type":"string"},"oldest":{"type":"string"},"newest":{"type":"string"}},"required":["window","posts","views","likes","comments","engagement_rate","measured_at"]},"receipt":{"type":"string"},"coverage":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"video_id":{"type":"string"},"type":{"const":"reel"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"play_count":{"type":"number"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"video_length_seconds":{"type":"number"},"image_url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}},"required":["type"]}}},"required":["summary","count","coverage","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_post":{"post":{"operationId":"social.facebook_post","summary":"Facebook post","description":"Fetch a single public Facebook post or reel by URL. Returns engagement metrics (reactions, comments, reshares, video views), text, the author, and the `post_id` that `facebook_post_comments` takes.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full Facebook post/reel URL (https://www.facebook.com/.../posts/... or /reel/...)."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"image_url":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"video_length_seconds":{"type":"number"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_post_comments":{"post":{"operationId":"social.facebook_post_comments","summary":"Facebook post comments","description":"Get the comments on a public Facebook post. Pass `post_id` when you already have it (from `facebook_page_posts`, `facebook_search`, or `facebook_post` results — saves a lookup), otherwise pass the post URL. Use when the user asks about comments, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"post_id":{"type":"string","minLength":1,"description":"Numeric `post_id` from another Facebook tool's result."},"url":{"type":"string","format":"uri","description":"Full Facebook post URL."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"post_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"comment_id":{"type":"string"},"created_at":{"type":"string"},"text":{"type":"string"},"replies_count":{"type":"number"},"reactions_count":{"type":"number"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","post_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_group":{"post":{"operationId":"social.facebook_group","summary":"Facebook group","description":"Look up a Facebook group by URL or slug. Returns name, description, member count, location, and privacy ('Public group' / 'Private group' — only public groups' posts can be read).","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"group":{"type":"string","minLength":1,"description":"Facebook group URL (https://www.facebook.com/groups/<slug>), bare slug, or numeric group id."}},"required":["group"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"privacy":{"type":"string"},"members_count":{"type":"number"},"location":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_group_posts":{"post":{"operationId":"social.facebook_group_posts","summary":"Facebook group posts","description":"Get a PUBLIC Facebook group's posts with engagement counts and reaction breakdowns — community discussion, buy/sell activity, niche conversations. Sort 'chronological' (newest first, default) or 'top'. Private groups return no posts. Use `facebook_post_comments` with a result's `post_id` to read a discussion thread.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"group":{"type":"string","minLength":1,"description":"Facebook group URL (https://www.facebook.com/groups/<slug>), bare slug, or numeric group id."},"max_items":{"type":"integer","minimum":1,"maximum":20,"default":10,"description":"How many posts to return (max 20; ~3 fetched per upstream page, so large values are slower)."},"sort":{"enum":["chronological","top"],"type":"string","default":"chronological","description":"'chronological' = newest first (real-time monitoring); 'top' = the group's top posts."}},"required":["group"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"guidance":{"type":"string"},"group_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","group_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/facebook_search":{"post":{"operationId":"social.facebook_search","summary":"Facebook search","description":"Search Facebook for public posts about a topic, brand, or keyword (across pages, public profiles, and public groups). Use for monitoring mentions and conversations. Set `recent:true` for the most recent posts instead of the most relevant; narrow with start_date/end_date. There is no search for groups by topic: to find public-group discussion on a topic, `web_search` for `<topic> facebook group` (no `site:facebook.com` — that search is refused), then read the group URLs it returns with `facebook_group_posts`.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text."},"max_items":{"type":"integer","minimum":1,"maximum":36,"default":18,"description":"Maximum posts to return (paginated upstream, max 36)."},"recent":{"type":"boolean","default":false,"description":"When true, returns the most recent posts (chronological) instead of the most relevant. Use for real-time monitoring."},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts on/after this date (YYYY-MM-DD)."},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only posts before this date (YYYY-MM-DD)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"post_id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"comments_count":{"type":"number"},"reactions_count":{"type":"number"},"reshare_count":{"type":"number"},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"video_view_count":{"type":"number"},"external_url":{"type":"string"},"image_url":{"type":"string"},"album_image_urls":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"group":{"type":"object","properties":{"group_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}}}}}},"required":["summary","query","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/reddit_search":{"post":{"operationId":"social.reddit_search","summary":"Reddit search","description":"Search Reddit for public posts about a topic, brand, product, or keyword. Use it for community sentiment, product complaints, niche discussion, or 'what is Reddit saying about…' questions — early signal often appears here before X or the news. Optionally scope to a single subreddit. Returns posts with title, text, score, comment count and an absolute reddit.com `url`; cite the `url` of any post you use. `text` is an excerpt — `reddit_post` reads a full post, `reddit_post_comments` its discussion.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"The search query, e.g. a brand, product, or topic."},"subreddit":{"type":"string","minLength":1,"description":"Restrict the search to one subreddit (without the r/ prefix)."},"sort":{"enum":["relevance","hot","top","new","comments"],"type":"string","default":"relevance","description":"'relevance' for best matches, 'new' for the most recent, 'top' for highest scoring, 'comments' for most discussed."},"within":{"type":"string","pattern":"^\\d+[smhd]$","description":"Only posts from the last relative window, e.g. '30m', '1h', '8h', '7d'. Use for real-time monitoring."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (paginated upstream, max 100)."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string"},"subreddit":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"}}}}},"required":["summary","query","count","truncated","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/reddit_subreddit_posts":{"post":{"operationId":"social.reddit_subreddit_posts","summary":"Reddit subreddit posts","description":"Browse a subreddit's feed: 'hot' (currently popular), 'new' (latest), 'rising' (gaining traction fast), or 'top' (highest scoring within `time`). Use to monitor a specific community — e.g. a brand's category subreddits. For keyword search across Reddit use `reddit_search` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"subreddit":{"type":"string","minLength":1,"description":"Subreddit name without the r/ prefix, e.g. 'technology'."},"sort":{"enum":["hot","new","rising","top"],"type":"string","default":"hot","description":"'hot' = currently popular, 'new' = latest, 'rising' = gaining fast, 'top' = highest scoring within `time`."},"time":{"enum":["hour","day","week","month","year","all"],"type":"string","description":"Time window for sort:'top' (default 'day'). Ignored for other sorts."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (max 100)."}},"required":["subreddit"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"subreddit":{"type":"string"},"sort":{"enum":["hot","new","rising","top"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"}}}}},"required":["summary","subreddit","sort","count","truncated","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/reddit_post":{"post":{"operationId":"social.reddit_post","summary":"Reddit post","description":"Read one Reddit post by its exact URL, including its complete text, title, author, score and canonical URL. Use this first when the user supplies a specific Reddit post link. Do not search for its title or substitute similar posts. Cite the returned `url`. Comments are separate: use `reddit_post_comments` only when the discussion is needed.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"post_url":{"type":"string","format":"uri","description":"Full Reddit post URL, e.g. https://www.reddit.com/r/sub/comments/abc123/title/"}},"required":["post_url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"subreddit":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"num_comments":{"type":"number"},"created_at":{"type":"string"},"flair":{"type":"string"},"over_18":{"const":true},"link_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/reddit_post_comments":{"post":{"operationId":"social.reddit_post_comments","summary":"Reddit post comments","description":"Get the comment thread of a Reddit post by URL. Nested replies are flattened depth-first with a `depth` field. Use when the user asks about reactions, sentiment, or discussion on a specific post. Does not include the post body (`reddit_post` does).","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"post_url":{"type":"string","format":"uri","description":"Full Reddit post URL, e.g. https://www.reddit.com/r/sub/comments/abc123/title/"},"sort":{"enum":["confidence","top","new","controversial","old","qa"],"type":"string","default":"confidence","description":"'confidence' = Reddit's default 'best' ranking, 'top' = highest scoring, 'new' = most recent, 'controversial' = most disputed."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many comments to return, including replies (max 50)."}},"required":["post_url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"post_url":{"type":"string"},"sort":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"author":{"type":"string"},"score":{"type":"number"},"depth":{"type":"number"},"created_at":{"type":"string"}}}}},"required":["summary","post_url","sort","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_search":{"post":{"operationId":"social.x_search","summary":"X search","description":"Search X (Twitter) for public posts about a topic, hashtag, keyword, or account. Use it for trend analysis, monitoring conversations, tracking what an account or its mentions are posting, or finding high-engagement/viral posts. Supports X advanced-search operators directly in `query` (e.g. `from:nasa`, `to:nasa`, `#hashtag`, `\"exact phrase\"`, `since:2026-01-01`). When the user shares an X URL like https://x.com/user/status/123, search the status id (`123`) to find the post and related conversation.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search text. May embed X advanced-search operators (from:, to:, #tag, exact phrases in quotes, since:/until:)."},"query_type":{"enum":["Top","Latest"],"type":"string","default":"Top","description":"'Top' for popular/relevant posts, 'Latest' for the most recent chronological results."},"max_items":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum posts to return (paginated upstream, max 100)."},"since_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only return posts on/after this date (YYYY-MM-DD)."},"until_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only return posts before this date (YYYY-MM-DD)."},"within":{"type":"string","pattern":"^\\d+[smhd]$","description":"Only posts from the last relative window (fine-grained recency via within_time:), e.g. '30m', '1h', '8h', '7d'. Pair with query_type:'Latest' for real-time monitoring. Supersedes since_date."},"language":{"type":"string","pattern":"^[a-z]{2}$","description":"Restrict to a language (ISO 639-1 code, e.g. en, es, pt)."},"has_engagement":{"type":"boolean","default":false,"description":"When true, drops low-engagement posts (min_faves/min_retweets/min_replies >= 5). Set only when the user explicitly wants popular posts; it can sharply reduce results."},"min_faves":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many likes. Leave unset unless the user explicitly asks for popular posts; even a minimum of 1 drops every post with no likes and can sharply reduce results."},"min_retweets":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many retweets. Leave unset unless the user explicitly asks for widely-shared posts; even a minimum of 1 drops every post with no retweets and can sharply reduce results."},"min_replies":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Require at least this many replies. Leave unset unless the user explicitly asks for posts that drew discussion; even a minimum of 1 drops every post with no replies and can sharply reduce results."}},"required":["query"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"query":{"type":"string","description":"The query sent to X, operators included."},"section":{"enum":["top","latest"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"}}}}},"required":["summary","query","section","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_profile":{"post":{"operationId":"social.x_profile","summary":"X profile","description":"Look up an X (Twitter) profile by @username. Use whenever the user asks about follower counts, bio, verification, or basic account info.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"},"url":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"created_at":{"type":"string"},"tweet_count":{"type":"number"},"media_count":{"type":"number"},"likes_count":{"type":"number"},"listed_count":{"type":"number"},"profile_image_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_user_posts":{"post":{"operationId":"social.x_user_posts","summary":"X user posts","description":"Use when the user asks for an account's recent/top/most-liked/most-viewed posts (e.g. 'top tweet of the week'). Returns recent posts (newest first) with engagement counts; sort and filter client-side. For search across many accounts use `x_search` instead.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"},"max_items":{"type":"integer","minimum":1,"maximum":40,"default":20,"description":"How many recent posts to return (max 40)."}},"required":["username"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"user_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"}}}}},"required":["summary","username","user_id","count","posts"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_post":{"post":{"operationId":"social.x_post","summary":"X post","description":"Fetch a single X (Twitter) post by URL. Returns engagement metrics (likes, replies, retweets, views), the full text (long posts included), and the author; X Articles include their title and full body. Call this directly for any x.com/twitter.com status URL — never `read_url` or `web_search` an X link (those pages are client-rendered and won't load); if an Article's body couldn't be fetched, say so rather than searching for it.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https://x.com/user/status/123"}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"},"summary":{"type":"string","description":"One-line result, for the reader."},"article":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["body"]},"article_note":{"type":"string"}},"required":["summary"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_post_comments":{"post":{"operationId":"social.x_post_comments","summary":"X post comments","description":"Get the replies (comments) on an X (Twitter) post by URL. Use when the user asks about replies, reactions, or sentiment on a specific post.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https://x.com/user/status/123"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many replies to return."}},"required":["url"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"tweet_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string"},"lang":{"type":"string"},"like_count":{"type":"number"},"reply_count":{"type":"number"},"retweet_count":{"type":"number"},"quote_count":{"type":"number"},"bookmark_count":{"type":"number"},"view_count":{"type":"number"},"hashtags":{"type":"array","items":{"type":"string"}},"author":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}},"article_url":{"type":"string"}}}}},"required":["summary","tweet_id","count","comments"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_user_connections":{"post":{"operationId":"social.x_user_connections","summary":"X user connections","description":"List an X (Twitter) account's followers or accounts it follows. Use for audience/network questions ('who follows X', 'who does X follow'). X-only — Instagram has no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"username":{"type":"string","minLength":1,"description":"X handle, without the leading @"},"relation":{"enum":["followers","following"],"type":"string","description":"'followers' = who follows them; 'following' = who they follow."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many accounts to return."}},"required":["username","relation"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"username":{"type":"string"},"relation":{"enum":["followers","following"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}}}},"required":["summary","username","relation","count","users"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_tweet_engagers":{"post":{"operationId":"social.x_tweet_engagers","summary":"X tweet engagers","description":"List the accounts that retweeted or liked a specific X (Twitter) post (by URL). Use for engagement/audience analysis on a post. X-only — Instagram has no equivalent. X does not expose engager lists for every post: an empty result means the list is unavailable, not that nobody engaged — use the post's like/retweet counts for totals.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Full X post URL, e.g. https://x.com/user/status/123"},"type":{"enum":["retweeters","likers"],"type":"string","description":"'retweeters' = who retweeted; 'likers' = who liked."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"How many accounts to return."}},"required":["url","type"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"tweet_id":{"type":"string"},"type":{"enum":["retweeters","likers"],"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"coverage":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"verified":{"type":"boolean"},"followers_count":{"type":"number"},"following_count":{"type":"number"}}}}},"required":["summary","tweet_id","type","count","truncated","coverage","users"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/x_trends":{"post":{"operationId":"social.x_trends","summary":"X trends","description":"Get the top trending topics on X (Twitter) for a location (WOEID). Defaults to worldwide. Use when the user asks what's trending. X-only — Instagram has no equivalent.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":1,"description":"Yahoo WOEID for the location. 1 = worldwide (default), 23424977 = USA."}}}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"woeid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trends":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"tweet_volume":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","tweet_volume"]}}},"required":["summary","woeid","count","trends"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/social/resolve_mention":{"post":{"operationId":"social.resolve_mention","summary":"Resolve a social mention","description":"Resolve a social @handle to the real account(s) it maps to, so you can mention it correctly. Use this to DISAMBIGUATE which platform a handle belongs to (the same handle can exist on Instagram, X, TikTok, etc.) and to confirm an account exists before linking it. Returns each match's ready-to-paste `mention_markdown` (`[@handle](url)`) — emit that verbatim, never invent a handle or URL. Pass `platform` when you already know it (one lookup); omit it to probe every supported platform and disambiguate.","tags":["Social"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"max_credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Refuse the call when its quoted ceiling exceeds this many credits."},"tool_call_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The tool call behind this read, for the ledger. Every read that runs is billed, a repeated id too."},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat this call belongs to, for cost attribution."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The chat turn this call belongs to, for cost attribution."},"run_lock":{"type":"boolean","description":"The chat turn holds its conversation's run lock: the read is refused once the turn no longer does (it was stopped)."},"input":{"type":"object","properties":{"handle":{"type":"string","description":"The account handle/username, without a leading @ or URL."},"platform":{"enum":["instagram","x","linkedin","youtube","tiktok","facebook"],"type":"string","description":"The platform, if known: `instagram`, `x`, `tiktok`, `youtube`, `linkedin`, or `facebook`. Omit to probe all and disambiguate."}},"required":["handle"]}},"required":["organization_id","input"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"enum":["instagram_profile","instagram_user_posts","instagram_user_reels","instagram_user_stories","instagram_user_highlights","instagram_highlight_stories","instagram_post","instagram_post_comments","instagram_search","instagram_hashtag_posts","tiktok_profile","tiktok_user_posts","tiktok_post","tiktok_post_comments","tiktok_search","tiktok_hashtag_posts","tiktok_music_posts","tiktok_trending","tiktok_trend_scan","linkedin_profile","linkedin_company","linkedin_user_posts","linkedin_company_posts","linkedin_post","linkedin_search_people","linkedin_search_posts","youtube_channel","youtube_channel_videos","youtube_channel_playlists","youtube_channel_shorts","youtube_video","youtube_search","youtube_trending","facebook_page","facebook_page_posts","facebook_page_reels","facebook_post","facebook_post_comments","facebook_group","facebook_group_posts","facebook_search","reddit_search","reddit_subreddit_posts","reddit_post","reddit_post_comments","x_search","x_profile","x_user_posts","x_post","x_post_comments","x_user_connections","x_tweet_engagers","x_trends","resolve_mention"],"type":"string","description":"Operation name — see the operations catalog."},"result":{"type":"object","properties":{"summary":{"type":"string","description":"One-line result, for the reader."},"guidance":{"type":"string"},"matches":{"type":"array","items":{"type":"object","properties":{"platform":{"enum":["instagram","x","linkedin","youtube","tiktok","facebook"],"type":"string"},"platform_label":{"type":"string"},"handle":{"type":"string"},"profile_url":{"type":"string"},"mention_markdown":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["platform","platform_label","handle","profile_url","mention_markdown","display_name","followers"]}}},"required":["summary","matches"]},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991},"credits_charged":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["operation","result","requests","credits_charged"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/voices":{"get":{"operationId":"voices.list","summary":"List voices","description":"Lists the voices the caller can read.","tags":["Voices"],"parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","pattern":"^org_"},"allowEmptyValue":true,"allowReserved":true},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}},"quota":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["used","limit"]}},"required":["voices","quota"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"voices.create","summary":"Create voice","description":"Creates a voice and returns the created row.","tags":["Voices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_"},"provider":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"source":{"anyOf":[{"type":"object","properties":{"type":{"const":"clone"},"sample_asset_ids":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","format":"uuid"}},"consent":{"const":true}},"required":["type","sample_asset_ids","consent"]},{"type":"object","properties":{"type":{"const":"design"},"prompt":{"type":"string","minLength":20,"maxLength":1000}},"required":["type","prompt"]}]},"visibility":{"enum":["private","workspace"],"type":"string","default":"private"}},"required":["organization_id","provider","name","source"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/EndlessApiVersion"}]}},"/voices/{voice_id}":{"patch":{"operationId":"voices.update","summary":"Update voice","description":"Updates a voice and returns the updated row. Scoped to the voice named by `voice_id`. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.","tags":["Voices"],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"visibility":{"enum":["private","workspace"],"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"quick_action_id":{"type":"string"},"organization_id":{"type":"string"},"media_model_id":{"type":"string"},"model":{"type":"object","properties":{"name":{"type":"string"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","owner"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"enum":["private","workspace","public"],"type":"string"},"created_by_id":{"type":"string"},"source":{"enum":["clone","design"],"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sample_asset_ids":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","quick_action_id","organization_id","media_model_id","model","name","description","visibility","created_by_id","source","prompt","sample_asset_ids","cached","created_at","updated_at"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"voices.delete","summary":"Delete voice","description":"Deletes a voice. Scoped to the voice named by `voice_id`.","tags":["Voices"],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/EndlessApiVersion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}},"400":{"description":"The request is malformed, or failed input validation. `message` names the field and the rule it broke; `data.issues` carries them individually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No bearer token, or a token that failed verification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has no credits left, or the caller is over a spending limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Authenticated, but the caller's role in this workspace does not carry the permission this operation needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No resource with that id, or the caller cannot read it. The two are deliberately one answer, so an id cannot be probed for existence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request is well-formed, but the resource's current state forbids it — a taken name, a last admin, a limit already reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The caller has spent its rate-limit window. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The request failed on our side. Safe to retry an idempotent operation with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"tags":[{"name":"API keys"},{"name":"Access"},{"name":"Activity"},{"name":"Alert policy"},{"name":"Assets"},{"name":"Billing"},{"name":"Canvases"},{"name":"Chat models"},{"name":"Connector credentials"},{"name":"Connectors"},{"name":"Conversations"},{"name":"Credits"},{"name":"Custom skills"},{"name":"Documents"},{"name":"Generations"},{"name":"Invitations"},{"name":"Library"},{"name":"Members"},{"name":"Models"},{"name":"Notifications"},{"name":"Organization logo"},{"name":"Organizations"},{"name":"Projects"},{"name":"Reports"},{"name":"Roles"},{"name":"Scheduled tasks"},{"name":"Search"},{"name":"Skill catalog"},{"name":"Social"},{"name":"Teams"},{"name":"Tools"},{"name":"Transcripts"},{"name":"Users"},{"name":"Voices"},{"name":"Workspace chat models"},{"name":"Workspace models"}]}