{"openapi":"3.2.0","info":{"title":"Account","description":"","version":"1.0.0"},"servers":[{"url":"https:\/\/account.api.weglot.com","description":"Prod"},{"url":"https:\/\/account.api.weglot.dev","description":"Staging"}],"paths":{"\/public\/deployments":{"get":{"operationId":"api_publicdeployments_get_collection","tags":["Deployment"],"responses":{"200":{"description":"Deployment collection","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Deployment-read.deployment.public"}}},"application\/ld+json":{"schema":{"type":"object","description":"Deployment.jsonld-read.deployment.public collection.","allOf":[{"$ref":"#\/components\/schemas\/HydraCollectionBaseSchemaNoPagination"},{"type":"object","required":["member"],"properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Deployment.jsonld-read.deployment.public"}}}}]}}}}},"summary":"Retrieve the collection of deployments.","description":"Retrieve the collection of deployments, with the base URL of the API serving their projects.","parameters":[],"security":[],"x-apiplatform-tag":["Public"]}},"\/oauth\/authorize":{"get":{"operationId":"oauth_authorize","tags":["OAuth 2.0"],"responses":{"200":{"description":"Authorization code generated or consent required","content":{"application\/json":{"schema":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","description":"Authorization code"},"state":{"type":"string","description":"State parameter"}}},{"type":"object","properties":{"consent_required":{"type":"boolean","example":true},"client_id":{"type":"string","format":"uuid"},"client_name":{"type":"string"},"redirect_uri":{"type":"string","format":"uri"},"state":{"type":"string"},"scope":{"type":"string"}}}]},"example":{"code":"SplxlOBeZQQYbYS6WxSbIA","state":"af0ifjsldkj"}}}},"400":{"description":"Invalid request parameters","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"invalid_request"},"error_description":{"type":"string"}}},"example":{"error":"invalid_request","error_description":"The \u0022redirect_uri\u0022 parameter is required."}}}},"401":{"description":"User not authenticated (`{code, message}` body), or client authentication failed (`{error, error_description}` body)","content":{"application\/json":{"schema":{"oneOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","example":401},"message":{"type":"string"}}},{"type":"object","required":["error"],"properties":{"error":{"type":"string","example":"invalid_client"},"error_description":{"type":"string"}}}]},"example":{"code":401,"message":"JWT Token not found"}}}},"403":{"description":"Forbidden","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"OAuth 2.0 Authorization Endpoint.","description":"**Access:**\n- **user**\n\nIssues an authorization code for the authenticated user, to exchange on `POST \/oauth\/token` with the `authorization_code` grant. When the user has not consented to the application yet, answers `consent_required: true` with the details to show on the consent screen instead. Clients registered dynamically and public clients must send a PKCE `code_challenge`.","parameters":[{"name":"response_type","in":"query","description":"","required":true,"deprecated":false,"schema":{"type":"string","enum":["code"]},"style":"form","explode":true,"example":"code"},{"name":"client_id","in":"query","description":"","required":true,"deprecated":false,"schema":{"type":"string","format":"uuid"},"style":"form","explode":true,"example":"01234567-89ab-cdef-0123-456789abcdef"},{"name":"redirect_uri","in":"query","description":"","required":true,"deprecated":false,"schema":{"type":"string","format":"uri"},"style":"form","explode":true,"example":"https:\/\/example.com\/callback"},{"name":"state","in":"query","description":"Opaque value for CSRF protection","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":true},{"name":"scope","in":"query","description":"Space-delimited scope list","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":true,"example":"read write"},{"name":"code_challenge","in":"query","description":"PKCE code challenge (RFC 7636). 43-128 characters, alphabet [A-Za-z0-9-._~].","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":true},{"name":"code_challenge_method","in":"query","description":"PKCE code challenge method (RFC 7636). Required when `code_challenge` is provided. Only \u0022S256\u0022 is supported.","required":false,"deprecated":false,"schema":{"type":"string","enum":["S256"]},"style":"form","explode":true,"example":"S256"}],"security":[{"oauthToken":[]}],"x-apiplatform-tag":["Public"]},"servers":[{"url":"https:\/\/auth.weglot.com","description":"Prod"},{"url":"https:\/\/auth.weglot.dev","description":"Staging"}]},"\/oauth\/token":{"post":{"operationId":"oauth_token","tags":["OAuth 2.0"],"responses":{"200":{"description":"Token issued","content":{"application\/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT access token"},"refresh_token":{"type":"string","description":"Not returned for the client_credentials grant"},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"type":"integer","description":"Lifetime of the access token, in seconds"}}},"example":{"access_token":"YOUR_ACCESS_TOKEN","token_type":"Bearer","expires_in":900}}},"links":{}},"400":{"description":"Invalid request","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","unsupported_grant_type"]},"error_description":{"type":"string"}}},"example":{"error":"invalid_request","error_description":"Invalid request."}}},"links":{}},"401":{"description":"Client authentication failed, inactive client, or invalid grant","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_client","inactive_client","invalid_grant"]},"error_description":{"type":"string"}}},"example":{"error":"invalid_client","error_description":"Client authentication failed, or invalid grant."}}}},"403":{"description":"The client is not allowed to use this grant type","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized_client"]},"error_description":{"type":"string"}}},"example":{"error":"unauthorized_client","error_description":"The client is not allowed to use this grant type."}}}},"429":{"description":"Too many requests, retry later","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["too_many_requests"]},"error_description":{"type":"string"}}},"example":{"error":"too_many_requests","error_description":"Too many requests, retry later."}}}},"422":{"description":"An error occurred","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}}},"links":{}}},"summary":"OAuth 2.0 Token Endpoint.","description":"Issues an access token with the `authorization_code` grant, which requires PKCE for public clients, the `client_credentials` grant, or the `refresh_token` grant.","parameters":[],"requestBody":{"description":"OAuth 2.0 token request parameters","content":{"application\/json":{"schema":{"type":"object","required":["grant_type","client_id"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","client_credentials","refresh_token"]},"client_id":{"type":"string","format":"uuid","description":"Application client ID"},"client_secret":{"type":"string","description":"Application client secret, for a confidential client"},"code":{"type":"string","description":"Authorization code, for the authorization_code grant"},"redirect_uri":{"type":"string","description":"The redirect URI of the authorization request, for the authorization_code grant"},"code_verifier":{"type":"string","description":"PKCE code verifier, for the authorization_code grant when the authorization request had a `code_challenge`"},"refresh_token":{"type":"string","description":"Refresh token, for the refresh_token grant"}}},"example":{"grant_type":"client_credentials","client_id":"01234567-89ab-cdef-0123-456789abcdef","client_secret":"YOUR_CLIENT_SECRET"}}},"required":true},"security":[],"x-apiplatform-tag":["Public"]},"servers":[{"url":"https:\/\/auth.weglot.com","description":"Prod"},{"url":"https:\/\/auth.weglot.dev","description":"Staging"}]},"\/users\/me\/memberships":{"get":{"operationId":"api_usersmememberships_get_collection","tags":["User"],"responses":{"200":{"description":"The Workspaces of the user, keyed by uuid","content":{"application\/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/User.UserMembershipOutput-read.user-membership"}}},"application\/ld+json":{"schema":{"type":"object","description":"User.UserMembershipOutput.jsonld-read.user-membership collection.","allOf":[{"$ref":"#\/components\/schemas\/HydraCollectionBaseSchemaNoPagination"},{"type":"object","required":["member"],"properties":{"member":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/User.UserMembershipOutput.jsonld-read.user-membership"}}}}]}}}},"403":{"description":"Forbidden","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Retrieve the Workspaces of the authenticated user.","description":"**Access:**\n- **user**\n\nReturns every Workspace the user is a member of, keyed by uuid, with the user role and the region whose API serves the Workspace.","parameters":[],"security":[{"oauthToken":[]}],"x-apiplatform-tag":["Public"]}}},"components":{"schemas":{"AuthorizeController":{"type":"object"},"AuthorizeController.jsonld":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object"}]},"ConstraintViolation":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"ConstraintViolation.jsonld":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"description":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}}],"description":"Unprocessable entity"},"Deployment-read.deployment.public":{"type":"object","description":"A region hosting Weglot projects, with the base URL of the API serving them.","required":["id","name","apiBaseUrl"],"properties":{"id":{"example":"eu","type":"string"},"name":{"maxLength":255,"example":"Europe","type":"string"},"apiBaseUrl":{"readOnly":true,"description":"Base URL of the API serving the projects of this deployment.","example":"https:\/\/eu.api.weglot.com","type":"string"}}},"Deployment.jsonld-read.deployment.public":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object","required":["id","name","apiBaseUrl"],"properties":{"id":{"example":"eu","type":"string"},"name":{"maxLength":255,"example":"Europe","type":"string"},"apiBaseUrl":{"readOnly":true,"description":"Base URL of the API serving the projects of this deployment.","example":"https:\/\/eu.api.weglot.com","type":"string"}}}],"description":"A region hosting Weglot projects, with the base URL of the API serving them."},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"examples":[404],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}},"Error.jsonld":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"examples":[404],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}}],"description":"A representation of common errors."},"HydraCollectionBaseSchema":{"allOf":[{"$ref":"#\/components\/schemas\/HydraCollectionBaseSchemaNoPagination"},{"type":"object","properties":{"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":["string","null"],"format":"iri-reference"},"last":{"type":["string","null"],"format":"iri-reference"},"previous":{"type":["string","null"],"format":"iri-reference"},"next":{"type":["string","null"],"format":"iri-reference"}},"example":{"@id":"string","@type":"string","first":"string","last":"string","previous":"string","next":"string"}}}}]},"HydraCollectionBaseSchemaNoPagination":{"type":"object","properties":{"totalItems":{"type":"integer","minimum":0},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}}},"HydraItemBaseSchema":{"type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"type":"string"},"@type":{"type":"string"}},"required":["@id","@type"]},"TokenController":{"type":"object"},"TokenController.jsonld":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object"}]},"User.UserMembershipOutput-read.user-membership":{"type":"object","description":"A User is a person with a Weglot account, member of the Workspaces they work in.","properties":{"uuid":{"example":"0198c3f2-4a1b-7d3e-9f80-1a2b3c4d5e6f","type":"string","format":"uuid"},"slug":{"example":"acme-corp","type":"string"},"name":{"example":"Acme Corp","type":"string"},"organization":{"example":"0198c3f2-5c2d-7e4f-8a91-2b3c4d5e6f70","type":["string","null"],"format":"uuid"},"role":{"example":"EDITOR","type":["string","null"],"enum":["OWNER","ADMIN","EDITOR",null]},"hasBillingRight":{"example":false,"type":"boolean"},"restrictedLanguages":{"example":["fr","es"],"type":"array","items":{"type":"string"}},"deployment":{"example":{"id":"eu","name":"Europe","engineBaseUrl":"https:\/\/eu.api.weglot.com","frontBaseUrl":"https:\/\/app.eu.weglot.com"},"type":"object","additionalProperties":{"type":"string"}},"projects":{"example":{"0198c3f2-6d3e-7f50-9ba2-3c4d5e6f7081":{"role":"EDITOR","restrictedLanguages":["fr"]}},"type":"object","additionalProperties":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}}}}},"User.UserMembershipOutput.jsonld-read.user-membership":{"allOf":[{"$ref":"#\/components\/schemas\/HydraItemBaseSchema"},{"type":"object","properties":{"uuid":{"example":"0198c3f2-4a1b-7d3e-9f80-1a2b3c4d5e6f","type":"string","format":"uuid"},"slug":{"example":"acme-corp","type":"string"},"name":{"example":"Acme Corp","type":"string"},"organization":{"example":"0198c3f2-5c2d-7e4f-8a91-2b3c4d5e6f70","type":["string","null"],"format":"uuid"},"role":{"example":"EDITOR","type":["string","null"],"enum":["OWNER","ADMIN","EDITOR",null]},"hasBillingRight":{"example":false,"type":"boolean"},"restrictedLanguages":{"example":["fr","es"],"type":"array","items":{"type":"string"}},"deployment":{"example":{"id":"eu","name":"Europe","engineBaseUrl":"https:\/\/eu.api.weglot.com","frontBaseUrl":"https:\/\/app.eu.weglot.com"},"type":"object","additionalProperties":{"type":"string"}},"projects":{"example":{"0198c3f2-6d3e-7f50-9ba2-3c4d5e6f7081":{"role":"EDITOR","restrictedLanguages":["fr"]}},"type":"object","additionalProperties":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}}}}}],"description":"A User is a person with a Weglot account, member of the Workspaces they work in."}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"oauthToken":{"type":"http","description":"OAuth 2.0 access token (user or application).","scheme":"bearer","bearerFormat":"JWT"},"deploymentKey":{"type":"apiKey","description":"Deployment key sent in the X-Deploy-Key header.","name":"X-Deploy-Key","in":"header"}}},"security":[],"tags":[{"name":"OAuth 2.0","description":"Resource \u0027OAuth 2.0\u0027 operations."},{"name":"Deployment","description":"A region hosting Weglot projects, with the base URL of the API serving them."},{"name":"User","description":"A User is a person with a Weglot account, member of the Workspaces they work in."}],"webhooks":{},"x-enable-proxy":true}