{"openapi":"3.1.0","info":{"title":"Gná","version":"0.1.0"},"paths":{"/server":{"get":{"tags":["server"],"summary":"Server Info","operationId":"server_info_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerOut"}}}}}}},"/auth/invite":{"post":{"tags":["auth"],"summary":"Lookup Invite","description":"Check an invite or passkey link and return the name to greet the user with.","operationId":"lookup_invite_auth_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteLookupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInfoOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/register/options":{"post":{"tags":["auth"],"summary":"Register Options","description":"Start passkey registration from an invite (new account) or passkey link.","operationId":"register_options_auth_register_options_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterOptionsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/register/verify":{"post":{"tags":["auth"],"summary":"Register Verify","operationId":"register_verify_auth_register_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/login/options":{"post":{"tags":["auth"],"summary":"Login Options","operationId":"login_options_auth_login_options_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CeremonyOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/login/verify":{"post":{"tags":["auth"],"summary":"Login Verify","operationId":"login_verify_auth_login_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/demo":{"post":{"tags":["auth"],"summary":"Start Demo","description":"Start a temporary demo account with a quote bot, if the server offers a demo\n(`demo_enabled` in `GET /server`). No passkey; deleted when `demo_expires_at` passes.","operationId":"start_demo_auth_demo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserMeOut"},{"$ref":"#/components/schemas/IntegrationMeOut"}],"title":"Response Me Me Get"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["auth"],"summary":"Delete Me","description":"Delete the account with its conversations, messages, tokens, passkeys and sessions.","operationId":"delete_me_me_delete","responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Update Me","operationId":"update_me_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MePatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMeOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"410":{"description":"The invite or passkey link was used, revoked or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/conversations":{"get":{"tags":["conversations"],"summary":"List Conversations","operationId":"list_conversations_conversations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationOut"},"type":"array","title":"Response List Conversations Conversations Get"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["conversations"],"summary":"Create Conversation","operationId":"create_conversation_conversations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","operationId":"get_conversation_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"patch":{"tags":["conversations"],"summary":"Update Conversation","operationId":"update_conversation_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","description":"Delete the conversation, its messages and its tokens. Bots using them get 401.","operationId":"delete_conversation_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/conversations/{conversation_id}/read":{"post":{"tags":["conversations"],"summary":"Mark Read","operationId":"mark_read_conversations__conversation_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadIn"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/conversations/{conversation_id}/tokens":{"get":{"tags":["conversations"],"summary":"List Tokens","operationId":"list_tokens_conversations__conversation_id__tokens_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TokenOut"},"title":"Response List Tokens Conversations  Conversation Id  Tokens Get"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"post":{"tags":["conversations"],"summary":"Create Token","operationId":"create_token_conversations__conversation_id__tokens_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreatedOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"delete":{"tags":["conversations"],"summary":"Revoke All Tokens","description":"Revoke every active token in the conversation, in one transaction.","operationId":"revoke_all_tokens_conversations__conversation_id__tokens_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokensRevokedOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/conversations/{conversation_id}/tokens/{token_id}":{"delete":{"tags":["conversations"],"summary":"Revoke Token","operationId":"revoke_token_conversations__conversation_id__tokens__token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/conversations/{conversation_id}/messages":{"post":{"tags":["conversations"],"summary":"Send Message","operationId":"send_message_conversations__conversation_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/conversations/{conversation_id}/messages/{message_id}/press":{"post":{"tags":["conversations"],"summary":"Press Button","description":"Press a callback button. Single-use buttons answer 409 once used.","operationId":"press_button_conversations__conversation_id__messages__message_id__press_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PressIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Conflicts with the current state (e.g. `already_pressed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/messages":{"get":{"tags":["messages"],"summary":"Stream","description":"The user's single stream: new messages and message-updated events, oldest first.\n\nWith an integration token: the same, restricted to the token's conversation.","operationId":"stream_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Return events with an ID above this cursor.","default":0,"title":"After"},"description":"Return events with an ID above this cursor."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"timeout","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Long-poll seconds (capped by the server); 0 = no wait.","title":"Timeout"},"description":"Long-poll seconds (capped by the server); 0 = no wait."},{"name":"conversation","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this conversation.","title":"Conversation"},"description":"Only this conversation."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}},"post":{"tags":["messages"],"summary":"Send","description":"Send into the token's conversation. JSON, or multipart with an `image` file.","operationId":"send_messages_post","security":[{"HTTPBearer":[]}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request or image too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"415":{"description":"Unsupported Content-Type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Over a rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageIn"}},"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary"},"text":{"type":"string"},"silent":{"type":"boolean"},"reply_to":{"type":"integer"},"buttons":{"type":"string","description":"JSON, as in MessageIn"},"buttons_single_use":{"type":"boolean"},"notification_buttons":{"type":"string"}}}}}}}},"/updates":{"get":{"tags":["messages"],"summary":"Updates","description":"For integrations: user messages (incl. replies) and button presses, oldest first.","operationId":"updates_updates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Return events with an ID above this cursor.","default":0,"title":"After"},"description":"Return events with an ID above this cursor."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"timeout","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Long-poll seconds (capped by the server); 0 = no wait.","title":"Timeout"},"description":"Long-poll seconds (capped by the server); 0 = no wait."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/attachments":{"post":{"tags":["attachments"],"summary":"Upload","description":"Upload an image. It is validated, stripped of metadata, and thumbnailed.","operationId":"upload_attachments_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachments_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentOut"}}}},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request or image too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/attachments/{attachment_id}":{"get":{"tags":["attachments"],"summary":"Download","operationId":"download_attachments__attachment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request or image too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/attachments/{attachment_id}/thumb":{"get":{"tags":["attachments"],"summary":"Thumbnail","operationId":"thumbnail_attachments__attachment_id__thumb_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response"},"400":{"description":"Invalid request; `error` says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request or image too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}},"/devices":{"post":{"tags":["devices"],"summary":"Register","operationId":"register_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/devices/{apns_token}":{"delete":{"tags":["devices"],"summary":"Unregister","operationId":"unregister_devices__apns_token__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"apns_token","in":"path","required":true,"schema":{"type":"string","title":"Apns Token"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, unknown or revoked token, or expired session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Not allowed with this token (e.g. `send_only`) or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"The body or parameters do not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}}},"components":{"schemas":{"AccountOut":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"demo_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Demo Expires At","description":"Set for a demo account: it is deleted with everything in it at this time."}},"type":"object","required":["id","display_name","created_at","demo_expires_at"],"title":"AccountOut"},"AttachmentOut":{"properties":{"id":{"type":"string","title":"Id"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"blurhash":{"type":"string","title":"Blurhash"},"url":{"type":"string","title":"Url","description":"Relative to the server; needs the same Authorization."},"thumb_url":{"type":"string","title":"Thumb Url","description":"A JPEG thumbnail; relative, like `url`."}},"type":"object","required":["id","content_type","size","width","height","blurhash","url","thumb_url"],"title":"AttachmentOut"},"Body_upload_attachments_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_attachments_post"},"ButtonIn":{"properties":{"label":{"type":"string","maxLength":64,"minLength":1,"title":"Label"},"data":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Data","description":"Callback button: pressing it sends the integration a `callback` event carrying this value."},"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url","description":"Link button (http or https): the app opens it; nobody is told."}},"additionalProperties":false,"type":"object","required":["label"],"title":"ButtonIn","description":"A button: exactly one of `data` (callback) or `url` (link)."},"ButtonOut":{"properties":{"label":{"type":"string","title":"Label"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["label"],"title":"ButtonOut"},"CallbackOut":{"properties":{"message_id":{"type":"integer","title":"Message Id"},"row":{"type":"integer","title":"Row"},"col":{"type":"integer","title":"Col"},"label":{"type":"string","title":"Label"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"user":{"$ref":"#/components/schemas/CallbackUser"},"pressed_at":{"type":"string","format":"date-time","title":"Pressed At"}},"type":"object","required":["message_id","row","col","label","data","user","pressed_at"],"title":"CallbackOut"},"CallbackUser":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CallbackUser"},"CeremonyOut":{"properties":{"ceremony_id":{"type":"string","title":"Ceremony Id"},"options":{"additionalProperties":true,"type":"object","title":"Options","description":"PublicKeyCredentialCreationOptions / RequestOptions as JSON."}},"type":"object","required":["ceremony_id","options"],"title":"CeremonyOut"},"ConversationIn":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"icon":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Icon"},"encrypted":{"type":"boolean","title":"Encrypted","default":false},"allow_internal_urls":{"type":"boolean","title":"Allow Internal Urls","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"ConversationIn"},"ConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"encrypted":{"type":"boolean","title":"Encrypted"},"allow_internal_urls":{"type":"boolean","title":"Allow Internal Urls"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Muted Until"},"unread_count":{"type":"integer","title":"Unread Count"},"last_message_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Message Id"},"last_read_message_id":{"type":"integer","title":"Last Read Message Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"bot_online":{"type":"boolean","title":"Bot Online","description":"A bot is listening right now (has a long-poll open on /updates or /messages)."},"bot_last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bot Last Seen At","description":"Last request by any of the conversation's tokens, to the minute."}},"type":"object","required":["id","name","icon","encrypted","allow_internal_urls","muted_until","unread_count","last_message_id","last_read_message_id","created_at","bot_online","bot_last_seen_at"],"title":"ConversationOut"},"ConversationPatch":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"icon":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Icon"},"allow_internal_urls":{"type":"boolean","title":"Allow Internal Urls"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Muted Until"}},"additionalProperties":false,"type":"object","title":"ConversationPatch","description":"Only fields present in the body change. `null` clears `icon` and `muted_until`."},"DeviceIn":{"properties":{"apns_token":{"type":"string","maxLength":200,"minLength":1,"title":"Apns Token"},"environment":{"type":"string","enum":["production","sandbox"],"title":"Environment","default":"production"}},"additionalProperties":false,"type":"object","required":["apns_token"],"title":"DeviceIn"},"DeviceOut":{"properties":{"id":{"type":"string","title":"Id"},"environment":{"type":"string","title":"Environment"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","environment","created_at"],"title":"DeviceOut"},"ErrorOut":{"properties":{"error":{"type":"string","title":"Error","description":"A stable code to act on, e.g. `empty_message`."},"detail":{"title":"Detail","description":"For people; for 422 a list of problems by field."}},"type":"object","required":["error","detail"],"title":"ErrorOut"},"EventOut":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","enum":["message","message_updated","callback"],"title":"Type","description":"`message`: a new message. `message_updated`: a message changed, e.g. its buttons were pressed. `callback`: a callback button was pressed (see `callback`)."},"conversation_id":{"type":"string","title":"Conversation Id"},"message":{"$ref":"#/components/schemas/MessageOut","description":"The message the event is about, as it is now."},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackOut"},{"type":"null"}]}},"type":"object","required":["id","type","conversation_id","message"],"title":"EventOut"},"IntegrationMeOut":{"properties":{"kind":{"type":"string","const":"integration","title":"Kind","default":"integration"},"token":{"$ref":"#/components/schemas/TokenOut"},"conversation":{"$ref":"#/components/schemas/TokenConversationOut"}},"type":"object","required":["token","conversation"],"title":"IntegrationMeOut"},"InviteInfoOut":{"properties":{"kind":{"type":"string","enum":["account","passkey"],"title":"Kind"},"name":{"type":"string","title":"Name"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["kind","name","expires_at"],"title":"InviteInfoOut"},"InviteLookupIn":{"properties":{"token":{"type":"string","maxLength":256,"minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"InviteLookupIn"},"LoginOut":{"properties":{"session_token":{"type":"string","title":"Session Token"},"account":{"$ref":"#/components/schemas/AccountOut"}},"type":"object","required":["session_token","account"],"title":"LoginOut"},"MePatch":{"properties":{"display_name":{"type":"string","maxLength":64,"minLength":1,"title":"Display Name"}},"additionalProperties":false,"type":"object","required":["display_name"],"title":"MePatch"},"MessageIn":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Text","description":"Plain text; rejected in encrypted conversations."},"ciphertext":{"anyOf":[{"type":"string","maxLength":65536,"minLength":1},{"type":"null"}],"title":"Ciphertext","description":"Encrypted conversations only."},"nonce":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Nonce","description":"Encrypted conversations only."},"key_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Key Version","description":"Encrypted conversations only."},"silent":{"type":"boolean","title":"Silent","description":"Notify without sound and without lighting up the screen.","default":false},"reply_to":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Reply To","description":"ID of a message in this conversation to quote."},"buttons":{"items":{"items":{"$ref":"#/components/schemas/ButtonIn"},"type":"array","maxItems":8,"minItems":1},"type":"array","maxItems":8,"title":"Buttons","description":"Rows of buttons."},"buttons_single_use":{"type":"boolean","title":"Buttons Single Use","description":"After the first press of a callback button, disable all of them.","default":true},"notification_buttons":{"anyOf":[{"type":"string","enum":["ok","yes_no","ok_cancel"]},{"type":"null"}],"title":"Notification Buttons","description":"Buttons in the notification. Its actions press the first callback buttons of the first row (1 for `ok`, 2 otherwise), which must exist."},"attachments":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Attachments","description":"IDs from `POST /attachments`."},"image_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Image Url","description":"An image the server fetches before sending. On failure the message is sent without it and `image_fetch_error` says why."}},"additionalProperties":false,"type":"object","title":"MessageIn","description":"A new message: needs `text`, an image, or both (encrypted conversations: the envelope)."},"MessageOut":{"properties":{"id":{"type":"integer","title":"Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"sender":{"$ref":"#/components/schemas/SenderOut"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"ciphertext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ciphertext"},"nonce":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nonce"},"key_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Key Version"},"silent":{"type":"boolean","title":"Silent"},"reply_to":{"anyOf":[{"$ref":"#/components/schemas/ReplyOut"},{"type":"null"}]},"buttons":{"items":{"items":{"$ref":"#/components/schemas/ButtonOut"},"type":"array"},"type":"array","title":"Buttons"},"buttons_single_use":{"type":"boolean","title":"Buttons Single Use"},"buttons_disabled":{"type":"boolean","title":"Buttons Disabled"},"pressed":{"anyOf":[{"$ref":"#/components/schemas/PressOut"},{"type":"null"}]},"notification_buttons":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Buttons"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments"},"image_fetch_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Fetch Error","description":"Why `image_url` could not be fetched, e.g. `timeout` or `blocked_address`."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["id","conversation_id","sender","text","ciphertext","nonce","key_version","silent","reply_to","buttons","buttons_single_use","buttons_disabled","pressed","notification_buttons","attachments","image_fetch_error","created_at","updated_at","deleted"],"title":"MessageOut"},"PressIn":{"properties":{"row":{"type":"integer","minimum":0.0,"title":"Row"},"col":{"type":"integer","minimum":0.0,"title":"Col"}},"additionalProperties":false,"type":"object","required":["row","col"],"title":"PressIn"},"PressOut":{"properties":{"row":{"type":"integer","title":"Row"},"col":{"type":"integer","title":"Col"},"label":{"type":"string","title":"Label"},"pressed_at":{"type":"string","format":"date-time","title":"Pressed At"}},"type":"object","required":["row","col","label","pressed_at"],"title":"PressOut"},"ReadIn":{"properties":{"up_to":{"type":"integer","minimum":0.0,"title":"Up To"}},"additionalProperties":false,"type":"object","required":["up_to"],"title":"ReadIn"},"RegisterOptionsIn":{"properties":{"token":{"type":"string","maxLength":256,"minLength":1,"title":"Token"},"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["token"],"title":"RegisterOptionsIn"},"ReplyOut":{"properties":{"id":{"type":"integer","title":"Id"},"sender":{"type":"string","title":"Sender"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"has_image":{"type":"boolean","title":"Has Image"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["id","sender","excerpt","has_image","deleted"],"title":"ReplyOut"},"SenderOut":{"properties":{"kind":{"type":"string","enum":["user","integration"],"title":"Kind"},"name":{"type":"string","title":"Name"},"token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Id"},"token_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Name"}},"type":"object","required":["kind","name"],"title":"SenderOut"},"ServerOut":{"properties":{"allow_internal_urls":{"type":"boolean","title":"Allow Internal Urls","description":"Conversations may allow image_url to point at private addresses."},"demo_enabled":{"type":"boolean","title":"Demo Enabled","description":"`POST /auth/demo` starts a temporary demo account."},"api_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Url","description":"Where bots and scripts should connect, when the operator set an address other than this server's own (GNA_API_URL); null otherwise."}},"type":"object","required":["allow_internal_urls","demo_enabled","api_url"],"title":"ServerOut","description":"What this server permits, so clients can offer only what works here."},"StreamOut":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Events"},"next":{"type":"integer","title":"Next","description":"Pass as `after` in the next request."}},"type":"object","required":["events","next"],"title":"StreamOut"},"TokenConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"encrypted":{"type":"boolean","title":"Encrypted"}},"type":"object","required":["id","name","encrypted"],"title":"TokenConversationOut"},"TokenCreatedOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"send_only":{"type":"boolean","title":"Send Only"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"token":{"type":"string","title":"Token","description":"Shown only once; store it now."}},"type":"object","required":["id","name","send_only","created_at","last_used_at","revoked_at","token"],"title":"TokenCreatedOut"},"TokenIn":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"send_only":{"type":"boolean","title":"Send Only","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"TokenIn"},"TokenOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"send_only":{"type":"boolean","title":"Send Only"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","send_only","created_at","last_used_at","revoked_at"],"title":"TokenOut"},"TokensRevokedOut":{"properties":{"revoked":{"type":"integer","title":"Revoked","description":"Tokens revoked by this request; 0 if none were active."}},"type":"object","required":["revoked"],"title":"TokensRevokedOut"},"UserMeOut":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"},"account":{"$ref":"#/components/schemas/AccountOut"}},"type":"object","required":["account"],"title":"UserMeOut"},"VerifyIn":{"properties":{"ceremony_id":{"type":"string","maxLength":64,"minLength":1,"title":"Ceremony Id"},"credential":{"additionalProperties":true,"type":"object","title":"Credential"}},"additionalProperties":false,"type":"object","required":["ceremony_id","credential"],"title":"VerifyIn"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Session token (app) or `gna_` token","scheme":"bearer"}}}}