# Get all dossiers

Retrieve all dossiers in the archive

# 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": "Archive",
      "description": "Manage archive"
    }
  ],
  "paths": {
    "/archive": {
      "get": {
        "operationId": "list_archive",
        "summary": "Get all dossiers",
        "description": "Retrieve all dossiers in the archive",
        "tags": [
          "Archive"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Archive"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "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."
          }
        }
      },
      "DossierId": {
        "$ref": "#/components/schemas/DossierReference",
        "readOnly": true
      },
      "DossierReference": {
        "type": "string",
        "format": "uuid",
        "description": "Id of the dossier",
        "examples": [
          "22470767-904e-4553-9586-d7ed4f2b330e"
        ]
      },
      "InviteeId": {
        "$ref": "#/components/schemas/InviteeReference",
        "readOnly": true
      },
      "InviteeReference": {
        "description": "Optional. Indicates that only a particular invitee is allowed/required to use a field.",
        "type": "string",
        "format": "uuid",
        "examples": [
          "c6f7eb6f-7414-4f5e-9096-85c6c5a48f84"
        ]
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of items",
            "minimum": 1,
            "examples": [
              1
            ]
          },
          "perPage": {
            "type": "integer",
            "description": "The number of items per page",
            "examples": [
              10
            ]
          },
          "currentPage": {
            "type": "integer",
            "description": "The current page number",
            "examples": [
              1
            ]
          },
          "lastPage": {
            "type": "integer",
            "description": "The page number of the last available page",
            "examples": [
              1
            ]
          },
          "from": {
            "type": "integer",
            "description": "The number of the first item in the current page",
            "examples": [
              1
            ]
          },
          "to": {
            "type": "integer",
            "description": "The number of the last item in the current page",
            "examples": [
              1
            ]
          }
        }
      },
      "ArchiveInvitee": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/InviteeId"
          },
          "name": {
            "type": "string",
            "description": "Name of the person invited to read and/or sign the document",
            "maxLength": 255,
            "examples": [
              "Peter Invitee"
            ]
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "A valid email address",
            "maxLength": 255
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the invitee was updated",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the invitee was created",
            "readOnly": true
          }
        }
      },
      "ArchiveFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the file",
            "examples": [
              "730c6ec8-755b-450f-9ab6-f57111ab2a76"
            ],
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Original name of the file without extension",
            "maxLength": 255,
            "examples": [
              "Purchase contract"
            ]
          },
          "contentType": {
            "type": "string",
            "description": "The content type identifying the type of file",
            "examples": [
              "application/pdf"
            ],
            "readOnly": true
          },
          "size": {
            "type": "integer",
            "description": "The size of the file in bytes",
            "examples": [
              3028
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the file was updated",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date the file was created",
            "readOnly": true
          }
        }
      },
      "Archive": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Pagination"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/DossierId"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the dossier",
                      "examples": [
                        "Purchase contract"
                      ]
                    },
                    "invitees": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArchiveInvitee"
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArchiveFile"
                      }
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date the dossier was updated",
                      "readOnly": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date the dossier was created",
                      "readOnly": true
                    }
                  }
                }
              }
            }
          }
        ]
      }
    },
    "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
    }
  }
}
````