action contract_p_post_api_keys_resource { label: "Create a new API Key" description: "API Keys are simple randomly generated strings bound to roles that grant access to resources.\n\nEvery API Key maps to attributes defining its validity and can be revoked at any time.\n\nAPI Key can be passed in the **X-API-Key** HTTP Header and in the querystring **&api_key=**\n\n\n**Permission required:** edit_backend_settings" provider: contract_p method: POST path: "/auth/api-key" encoding: json input: { type: "object" properties: { "X-Fields": { type: "string" format: "mask" } } additionalProperties: false } output: { type: "object" required: ["active", "token", "user"] properties: { active: { type: "boolean" description: "Is the API Key active or not" } expire_at: { type: "string" format: "date-time" description: "The date at which the API Key will expire" } roles: { type: "array" description: "the user roles" items: { type: "object" required: ["role"] properties: { document_id: { type: "string" description: "limited to a document" } inbox: { type: "string" } role: { type: "string" } } } } token: { type: "string" description: "Token value" } user: { type: "string" description: "Bearer user" } } } }