Wazo Contexts API

The contexts API from Wazo — 4 operation(s) for contexts.

Operations 7

GET /contexts List contexts #
POST /contexts Create context #
GET /contexts/{context_id} Get context #
PUT /contexts/{context_id} Update context #
DELETE /contexts/{context_id} Delete context #
PUT /contexts/{context_id}/contexts Include contexts inside context #
GET /contexts/{context_id}/ranges/{range_type} List contexts range #

Documentation

Specifications

Other Resources

🔗
Console
https://api.wazo.io/documentation/console/authentication/
🔗
SourceCode
https://github.com/wazo-platform/wazo-auth
🔗
ChangeLog
https://github.com/wazo-platform/wazo-auth/blob/master/CHANGELOG.md
🔗
Conventions
https://raw.githubusercontent.com/api-evangelist/wazo/refs/heads/main/conventions/wazo-conventions.yml
🔗
ErrorCatalog
https://raw.githubusercontent.com/api-evangelist/wazo/refs/heads/main/errors/wazo-problem-types.yml
🔗
Console
https://api.wazo.io/documentation/console/configuration/
🔗
SourceCode
https://github.com/wazo-platform/wazo-confd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-confd/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/application/
🔗
SourceCode
https://github.com/wazo-platform/wazo-calld
🔗
ChangeLog
https://github.com/wazo-platform/wazo-calld/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/cdr/
🔗
SourceCode
https://github.com/wazo-platform/wazo-call-logd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-call-logd/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/contact/
🔗
SourceCode
https://github.com/wazo-platform/wazo-dird
🔗
ChangeLog
https://github.com/wazo-platform/wazo-dird/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/webhook/
🔗
SourceCode
https://github.com/wazo-platform/wazo-webhookd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-webhookd/blob/master/CHANGELOG.md
🔗
Webhooks
https://raw.githubusercontent.com/api-evangelist/wazo/refs/heads/main/asyncapi/wazo-events-webhooks.yml
🔗
Console
https://api.wazo.io/documentation/console/plugins/
🔗
SourceCode
https://github.com/wazo-platform/wazo-plugind
🔗
ChangeLog
https://github.com/wazo-platform/wazo-plugind/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/agent/
🔗
SourceCode
https://github.com/wazo-platform/wazo-agentd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-agentd/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/chat/
🔗
SourceCode
https://github.com/wazo-platform/wazo-chatd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-chatd/blob/master/CHANGELOG.md
🔗
SourceCode
https://github.com/wazo-platform/wazo-phoned
🔗
ChangeLog
https://github.com/wazo-platform/wazo-phoned/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/setup/
🔗
SourceCode
https://github.com/wazo-platform/wazo-setupd
🔗
ChangeLog
https://github.com/wazo-platform/wazo-setupd/blob/master/CHANGELOG.md
🔗
Console
https://api.wazo.io/documentation/console/amid/
🔗
SourceCode
https://github.com/wazo-platform/wazo-amid
🔗
ChangeLog
https://github.com/wazo-platform/wazo-amid/blob/master/CHANGELOG.md

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/wazo-contexts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

wazo-contexts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: wazo-confd Contexts API
  description: "Confd exposes an API for managing core resources on a Wazo server such as users, extensions, devices, voicemails, queues, etc. Resources can be associated together to provide additional functionality. For example: By associating a voicemail with a user, calls will automatically fallback on to the voicemail when the user cannot answer.\n\nImplementation notes\n====================\n\nErrors\n------\n\nResponses containing errors will have a status code in the 400 or 500 class. A list of error messages will be returned in the body of the response as a JSON-encoded array:\n\n~~~\n[\n    \"Input error - User not found\",\n    \"Resource error - User not associated to a line\"\n]\n~~~\n\n\nUpdating resources via PUT\n--------------------------\n\nWhen updating a resource, all fields become optional. In other words, only values that have been changed need to be sent to the server. Please note that this behavior may change in future versions of the API."
  version: '1.1'
  license:
    name: GPL v3
    url: http://www.gnu.org/licenses/gpl.txt
  contact:
    name: Wazo Dev Team
    url: https://wazo-platform.org/
    email: dev@wazo.community
  x-logo:
    url: https://wazo-platform.org/images/logo-black.svg
    backgroundColor: '#FAFAFA'
    altText: Wazo Logo
servers:
- url: /1.1
security:
- wazo_auth_token: []
tags:
- name: contexts
paths:
  /contexts:
    get:
      operationId: list_contexts
      summary: List contexts
      description: '**Required ACL:** `confd.contexts.read`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/tenantuuid'
      - $ref: '#/components/parameters/recurse'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/search'
      responses:
        '200':
          description: Contexts list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextItems'
    post:
      operationId: create_context
      summary: Create context
      description: '**Required ACL:** `confd.contexts.create`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/tenantuuid'
      responses:
        '201':
          description: Context created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Context'
        '400':
          $ref: '#/components/responses/CreateError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Context'
        description: Context to create
        required: true
  /contexts/{context_id}:
    get:
      operationId: get_context
      summary: Get context
      description: '**Required ACL:** `confd.contexts.{context_id}.read`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/contextid'
      responses:
        '200':
          description: Context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Context'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: update_context
      summary: Update context
      description: '**Required ACL:** `confd.contexts.{context_id}.update`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/contextid'
      responses:
        '204':
          $ref: '#/components/responses/ResourceUpdated'
        '400':
          $ref: '#/components/responses/UpdateError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Context'
        required: true
    delete:
      operationId: delete_context
      summary: Delete context
      description: '**Required ACL:** `confd.contexts.{context_id}.delete`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/contextid'
      responses:
        '204':
          $ref: '#/components/responses/ResourceDeleted'
        '400':
          $ref: '#/components/responses/DeleteError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /contexts/{context_id}/contexts:
    put:
      operationId: associate_context_contexts
      summary: Include contexts inside context
      description: '**Required ACL:** `confd.contexts.{context_id}.contexts.update`'
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/contextid'
      responses:
        '204':
          description: Context and Contexts associated
        '400':
          $ref: '#/components/responses/GenericError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextsId'
        description: Contexts to associated
        required: true
  /contexts/{context_id}/ranges/{range_type}:
    get:
      operationId: list_contexts_range
      summary: List contexts range
      description: '**Required ACL:** `confd.contexts.{context_id}.ranges.{range_type}.read`


        List the extension range for a given context and resource type. When filtering

        using the `availability=available` query string the range will be split into multiple

        sub-ranges to only contain extension numbers that are available.


        If a given extension exists but is not assigned to any resource it will still

        be considered to be unavailable and therefore will not be included in the list

        of available extension

        '
      tags:
      - contexts
      parameters:
      - $ref: '#/components/parameters/tenantuuid'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/rangetype'
      - $ref: '#/components/parameters/availability'
      - $ref: '#/components/parameters/contextid'
      responses:
        '200':
          description: Contexts list of ranges for that destination type in that context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextRangeItems'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    ContextRelationBase:
      properties:
        id:
          type: integer
          readOnly: true
          description: The id of the context
        uuid:
          type: string
          readOnly: true
          description: The UUID of the context
        name:
          type: string
          description: The name used by Asterisk
          readOnly: true
    ContextRelationContext:
      $ref: '#/components/schemas/ContextRelationBase'
    ContextRelationContexts:
      properties:
        contexts:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/ContextRelationContext'
    ContextRange:
      title: ContextRange
      properties:
        start:
          type: string
          default: <start>
        end:
          type: string
          default: <end>
      required:
      - start
    ContextItems:
      title: ContextItems
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Context'
        total:
          type: integer
      required:
      - total
    Context:
      title: Context
      allOf:
      - $ref: '#/components/schemas/ContextRelationBase'
      - properties:
          label:
            type: string
            description: The label of the context
          type:
            type: string
            default: internal
            enum:
            - internal
            - incall
            - outcall
            - services
            - others
          user_ranges:
            type: array
            items:
              $ref: '#/components/schemas/ContextRange'
          group_ranges:
            type: array
            items:
              $ref: '#/components/schemas/ContextRange'
          queue_ranges:
            type: array
            items:
              $ref: '#/components/schemas/ContextRange'
          conference_room_ranges:
            type: array
            items:
              $ref: '#/components/schemas/ContextRange'
          incall_ranges:
            type: array
            items:
              $ref: '#/components/schemas/ContextIncallRange'
          description:
            type: string
            description: Additional information about the context
          enabled:
            type: boolean
            default: true
          tenant_uuid:
            type: string
            description: The UUID of the tenant
            readOnly: true
      - $ref: '#/components/schemas/ContextRelationContexts'
      - required:
        - label
    ContextId:
      title: ContextId
      properties:
        id:
          type: integer
    ContextsId:
      title: ContextsId
      properties:
        contexts:
          items:
            $ref: '#/components/schemas/ContextId'
          type: array
    ContextIncallRange:
      title: ContextIncallRange
      allOf:
      - $ref: '#/components/schemas/ContextRange'
      - properties:
          did_length:
            type: integer
            default: 0
            description: The length of the did
    Error:
      type: array
      items:
        type: string
    ContextRangeItems:
      title: ContextRangeItems
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ContextRange'
        total:
          type: integer
      required:
      - total
      example:
        total: 3
        items:
        - start: 1006
          end: 1006
        - start: 1010
          end: 1014
        - start: 1025
          end: 1999
  responses:
    NotFoundError:
      description: The resource requested was not found on the server
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ResourceDeleted:
      description: Resource was deleted successfully
    ResourceUpdated:
      description: Resource was updated successfully
    GenericError:
      description: An error occurred during the operation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    CreateError:
      description: An error occurred when creating the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpdateError:
      description: An error occurred when updating the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    DeleteError:
      description: An error occurred when deleting the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    tenantuuid:
      name: Wazo-Tenant
      in: header
      description: The tenant's UUID, defining the ownership of a given resource.
      required: false
      schema:
        type: string
    offset:
      required: false
      name: offset
      in: query
      description: Number of items to skip over in the list. Useful for pagination.
      schema:
        type: integer
    availability:
      required: false
      name: availability
      in: query
      description: Determines if the ranges are going to be split to display only ranges with available extensions.
      schema:
        type: string
        enum:
        - available
        - all
        default: available
    order:
      required: false
      name: order
      in: query
      description: Name of the field to use for sorting the list of items returned.
      schema:
        type: string
    direction:
      required: false
      name: direction
      in: query
      description: Sort list of items in 'asc' (ascending) or 'desc' (descending) order
      schema:
        type: string
        enum:
        - asc
        - desc
    recurse:
      name: recurse
      in: query
      description: Should the query include sub-tenants
      required: false
      schema:
        type: boolean
        default: false
    search:
      required: false
      name: search
      in: query
      description: Search term for filtering a list of items. Only items with a field containing the search term will be returned.
      schema:
        type: string
    limit:
      required: false
      name: limit
      in: query
      description: Maximum number of items to return in the list
      schema:
        type: integer
    contextid:
      required: true
      name: context_id
      in: path
      description: context's ID
      schema:
        type: integer
    rangetype:
      required: true
      name: range_type
      in: path
      description: The extension range destination type
      schema:
        type: string
        enum:
        - user
        - group
        - queue
        - conference
        - incall
  securitySchemes:
    wazo_auth_token:
      type: apiKey
      name: X-Auth-Token
      in: header
x-xivo-port: 9486
x-xivo-name: confd
x-apievangelist-source:
  harvested_from: https://github.com/wazo-platform/wazo-confd
  assembly: base plugin api.yml deep-merged with all plugin api.yml fragments, reproducing what the running service serves at /api/confd/1.1/api/api.yml (see wazo_confd/plugins/api/http.py — xivo.chain_map.ChainMap)
  spec_version: Swagger 2.0 (as published by Wazo)
  harvested: '2026-08-17'