openapi: 3.1.0 info: version: '1.0' title: Zendesk Account Account Settings Sessions API description: Needs a description. tags: - name: Sessions paths: /api/v2/sessions: parameters: - $ref: '#/components/parameters/UserId' get: operationId: ListSessions tags: - Sessions summary: Zendesk Get Api V2 Sessions description: 'If authenticated as an admin, returns all the account''s sessions. If authenticated as an agent or end user, returns only the sessions of the user making the request. #### Pagination - Cursor pagination (recommended) - Offset pagination See [Pagination](/api-reference/introduction/pagination/). #### Allowed For * Admins, Agents, End users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/SessionsResponse' examples: default: $ref: '#/components/examples/SessionsResponseExample' /api/v2/users/{user_id}/sessions: parameters: - $ref: '#/components/parameters/UserId' delete: operationId: BulkDeleteSessionsByUserId tags: - Sessions summary: Zendesk Delete Api V2 Users User_id Sessions description: 'Deletes all the sessions for a user. #### Allowed For * Admins, Agents, End users ' responses: '204': description: No Content /api/v2/users/{user_id}/sessions/{session_id}: parameters: - $ref: '#/components/parameters/SessionId' - $ref: '#/components/parameters/UserId' get: operationId: ShowSession tags: - Sessions summary: Zendesk Get Api V2 Users User_id Sessions Session_id description: '#### Allowed For * Admins, Agents, End users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/SessionResponse' examples: default: $ref: '#/components/examples/SessionResponseExample' delete: operationId: DeleteSession tags: - Sessions summary: Zendesk Delete Api V2 Users User_id Sessions Session_id description: '#### Allowed For * Admins, Agents, End users ' responses: '204': description: No Content /api/v2/users/me/logout: delete: operationId: DeleteAuthenticatedSession tags: - Sessions summary: Zendesk Delete Api V2 Users Me Logout description: 'Deletes the current session. In practice, this only works when using session auth for requests, such as client-side requests made from a Zendesk app. When using OAuth or basic authentication, you don''t have a current session so this endpoint has no effect. #### Allowed For * Admins, Agents, End users ' responses: '204': description: No Content /api/v2/users/me/session: get: operationId: ShowCurrentlyAuthenticatedSession tags: - Sessions summary: Zendesk Get Api V2 Users Me Session description: '#### Allowed For * Admins, Agents, End users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/SessionResponse' examples: default: $ref: '#/components/examples/SessionResponseExample' /api/v2/users/me/session/renew: get: operationId: RenewCurrentSession tags: - Sessions summary: Zendesk Get Api V2 Users Me Session Renew description: '#### Allowed For * Admins, Agents, End users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/RenewSessionResponse' examples: default: $ref: '#/components/examples/RenewSessionResponseExample' components: schemas: RenewSessionResponse: type: object properties: authenticity_token: type: string description: A token of authenticity for the request SessionResponse: type: object properties: session: type: array items: $ref: '#/components/schemas/SessionObject' SessionsResponse: type: object properties: sessions: type: array items: $ref: '#/components/schemas/SessionObject'