---
title: "Renew Subscription"
url: "https://stage-api-docs.centraldispatch.com/apis/stage-event-api-1-0-0/versions/c1db9b9c-04c4-43e9-9e9c-fe74c2ca0f60/operations/postRenewSubscription"
---

> Full API specification: https://stage-api-docs.centraldispatch.com/apis/stage-event-api-1-0-0/versions/c1db9b9c-04c4-43e9-9e9c-fe74c2ca0f60.md

# Renew Subscription

`POST` `/subscriptions/id/{subscriptionId}/renew`

Operation ID: `postRenewSubscription`

Renew your subscription API key. #### 📝 Important Notes - Use this endpoint if your API key was lost or compromised. - The new `Api-Key` will be returned in the response headers. - The old API key will be immediately invalidated. - All future events will use the new API key for authentication. - The `If-Match` header is required and its value can be found in the `ETag` response header of the resource's GET by ID endpoint.

## Path parameters

- `subscriptionId` (string, uuid, required) - The ID of the subscription.

## Header parameters

- `If-Match` (integer, required) - This is a required field to ensure the update is being completed on an item that has not changed since it was last read. The value of this field will be the value of the `ETag` header that was received on the preceding get call.
- `Content-Type` (string, required) - The major version of the API to make a request against. This is a custom MIME type that contains `vnd.coxauto.v[#]+`. For example, to request a resource from version 1.x.x of an API, the Content-Type header should be set to `application/vnd.coxauto.v1+json`.

## Responses

- `204` - No Content. Successful request.
- `400` - Bad Request. Check the request payload. **Scenarios:** - Missing `If-Match` header (required for renewal).
- `401` - Unauthorized. Authentication failed or missing.
- `403` - Forbidden. The attempted action is not permitted.
- `404` - Not Found. **Scenarios:** - Subscription not found. - Invalid `subscriptionId`.
- `412` - Precondition Failed **Scenarios:** - `If-Match` header doesn't match current `ETag`. - Concurrent modification detected. - Resource modified by another request.
- `429` - Too Many Requests. Rate limit exceeded.
- `500` - Error.
- `503` - Service Unavailable. Temporary service interruption.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Event API
  version: 1.0.0
servers:
  - url: https://event-api.centraldispatch.com
    description: Production server
paths:
  /subscriptions/id/{subscriptionId}/renew:
    post:
      tags:
        - Subscription
      summary: Renew Subscription
      description: >-
        
        Renew your subscription API key.


        #### 📝 Important Notes

        - Use this endpoint if your API key was lost or compromised.

        - The new `Api-Key` will be returned in the response headers.

        - The old API key will be immediately invalidated.

        - All future events will use the new API key for authentication.

        - The `If-Match` header is required and its value can be found in the
        `ETag` response header of the resource's GET by ID endpoint.
      operationId: postRenewSubscription
      parameters:
        - name: subscriptionId
          in: path
          description: The ID of the subscription.
          required: true
          schema:
            type: string
            format: uuid
          example: 50b2863f-c75e-45cb-8d50-b5a975d67865
        - name: If-Match
          in: header
          description: This is a required field to ensure the update is being completed on
            an item that has not changed since it was last read. The value of
            this field will be the value of the `ETag` header that was received
            on the preceding get call.
          required: true
          schema:
            type: integer
          example: 8675309
        - name: Content-Type
          in: header
          description: The major version of the API to make a request against. This is a
            custom MIME type that contains `vnd.coxauto.v[#]+`. For example, to
            request a resource from version 1.x.x of an API, the Content-Type
            header should be set to `application/vnd.coxauto.v1+json`.
          required: true
          schema:
            type: string
          example: application/vnd.coxauto.v1+json
      responses:
        "204":
          description: No Content. Successful request.
          headers:
            Etag:
              description: Contains the current version of the resource and should be used for
                the `If-Match` header on updates.
              schema:
                type: string
              example: "8675300"
            Last-Modified:
              description: Last-Modified
              schema:
                type: string
              example: 2024-10-15T00:00:00Z
            Api-Key:
              description: Should be stored by the caller and used to authenticate all
                incoming events from Central Dispatch. The value will be
                contained in the `Api-Token` header in all events delivered as
                part of this subscription.
              schema:
                type: string
              example: "True"
        "400":
          description: |-
            Bad Request. Check the request payload.

            **Scenarios:**

             - Missing `If-Match` header (required for renewal).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errors"
        "401":
          description: Unauthorized. Authentication failed or missing.
        "403":
          description: Forbidden. The attempted action is not permitted.
        "404":
          description: |-
            Not Found.

            **Scenarios:**

             - Subscription not found.
             - Invalid `subscriptionId`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmptyResponse"
        "412":
          description: |-
            Precondition Failed

            **Scenarios:**

             - `If-Match` header doesn't match current `ETag`.
             - Concurrent modification detected.
             - Resource modified by another request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errors"
        "429":
          description: Too Many Requests. Rate limit exceeded.
        "500":
          description: Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errors"
        "503":
          description: Service Unavailable. Temporary service interruption.
      security:
        - Bearer: []
security:
  - Bearer: []
components:
  schemas:
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/Error"
          description: A collection of errors.
          nullable: true
      description: An error occurred, and the request could not be completed.
    EmptyResponse:
      type: object
      description: No response.
    Error:
      type: object
      properties:
        code:
          type: string
          description: The code used for the issue.
          nullable: true
          example: resource.issue_type
        message:
          type: string
          description: A detailed message.
          nullable: true
          example: The issue happened because something is wrong.
        property:
          type: string
          description: The property to which the issue is associated.
          nullable: true
          example: person
        properties:
          type: object
          additionalProperties:
            type: string
          description: Additional properties related to the issue.
          nullable: true
          example:
            firstName: D0nn@
            lastName: Sm!th
      description: Details of an error or issue.
  securitySchemes:
    Bearer:
      type: http
      scheme: Bearer
```
