# Get invite

Retrieve the invite from the dossier.

# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "servers": [
    {
      "url": "https://api.cm.com/sign/v1"
    },
    {
      "url": "https://api.cm.com/sign-sandbox/v1"
    }
  ],
  "security": [
    {
      "JWT": []
    }
  ],
  "info": {
    "version": "1",
    "title": "Sign API",
    "description": "Sign by CM.com offers the ability to have end users sign PDF documents online.\n\nBefore you can start using the API, you need to be provided with credentials. You will have received these credentials, consisting of a Key and a Key Id, when you registered for Sign. If you have not yet received any credentials, you can request them via [this link](https://www.cm.com/app/verification-registration/sign). This will grant you access to the sandbox environment.\n\n*The credentials provided by CM.com are confidential and should be kept secret.*\n"
  },
  "tags": [
    {
      "name": "Invite",
      "description": "Manage invites"
    }
  ],
  "paths": {
    "/dossiers/{dossierId}/invites/{inviteId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DossierId"
        },
        {
          "$ref": "#/components/parameters/InviteId"
        }
      ],
      "get": {
        "operationId": "get_dossier_invite",
        "summary": "Get invite",
        "description": "Retrieve the invite from the dossier.\n",
        "tags": [
          "Invite"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "NotFound": {
        "description": "The specified resource was not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "parameters": {
      "DossierId": {
        "name": "dossierId",
        "in": "path",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "required": true,
        "description": "a uuid string that identifies a dossier\n",
        "example": "22470767-904e-4553-9586-d7ed4f2b330e"
      },
      "InviteId": {
        "name": "inviteId",
        "in": "path",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "required": true,
        "description": "a uuid string that identifies a single invite\n",
        "example": "6f840cea-796e-4d5d-97ce-20114af5f51c"
      }
    },
    "schemas": {
      "ErrorResponse": {
        "title": "Error Response",
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "Response status code, should match HTTP error code"
          },
          "message": {
            "type": "string",
            "description": "High level description of the error that occurred. This description, when present, can be shown to the end user. It might describe that the system is not available, or that an unexpected error occurred. In test mode, the API will return more information (targeted at the developer) here than in production mode."
          }
        }
      },
      "Invite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the invite",
            "examples": [
              "730c6ec8-755b-450f-9ab6-f57111ab1d93"
            ],
            "readOnly": true
          },
          "inviteeId": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the invitee",
            "examples": [
              "7ab828ac-054e-4189-b24d-a9ab1bf23196"
            ]
          },
          "inviteUri": {
            "type": "string",
            "format": "url",
            "description": "This is a link which the particular invitee can use to access and subsequently sign the dossier.\n",
            "examples": [
              "https://www.cm.com/app/sign/invites/fjDKGjSXeKSmZbH5zKDjuPmpQqoMZDfAAr7iZuXd4e8pIubzP5FwBm4Y28dwXG8zEHk"
            ],
            "readOnly": true
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType",
            "examples": [
              "email"
            ],
            "description": "Send invite via email, SMS or WhatsApp. Please note that SMS and WhatsApp are only available when configured for your account.\n\nIf this field is not provided or set to null, the invite will not be sent automatically. Instead, the `inviteUri` will be included in the response, and the link must be manually provided to the invitee.\n",
            "nullable": true
          },
          "emailConfig": {
            "type": "object",
            "writeOnly": true,
            "properties": {
              "message": {
                "type": "string",
                "description": "Add your own message to the invite email."
              }
            }
          },
          "reminder": {
            "type": "boolean",
            "examples": [
              false
            ],
            "description": "Marker to indicate this invite is a reminder of an earlier invite"
          },
          "emailSentAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date at which the email was sent that was requested by setting the `channel` property of an invite to `email`.",
            "readOnly": true
          },
          "expiresIn": {
            "type": "integer",
            "format": "int32",
            "minimum": 60,
            "maximum": 7776000,
            "examples": [
              2592000
            ],
            "default": 2592000,
            "description": "The expiry in seconds since invite was created"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the invite expires",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the invite was created",
            "readOnly": true
          }
        }
      },
      "ChannelType": {
        "type": "string",
        "enum": [
          "email",
          "sms",
          "whatsapp"
        ]
      }
    },
    "securitySchemes": {
      "JWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "In order to authenticate you need to use your credentials to generate a JWT Bearer token. The [JWT token](https://jwt.io/introduction/) has to be generated using the `HS256` algorithm and your credentials. This JWT has to contain the following attributes: `iat`, `nbf`, `exp`  in the payload, as well as the attribute `kid` in the header of the JWT. This `kid` attribute needs to contain the Key Id of your credentials.\n\nThe generated token needs to be passed via the HTTP Authorization header like:\n\n```\nAuthorization: Bearer GENERATED_TOKEN_HERE\n```\n\nThere are many libraries available for different programming languages that can help you to generate a JWT. See the Libraries tab on [https://jwt.io](https://jwt.io)\n"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 177,
      "2": 26,
      "3": 196,
      "4": 252,
      "5": 46,
      "6": 219,
      "7": 163,
      "8": 234,
      "9": 51,
      "10": 132,
      "11": 96
    }
  }
}
````