# Create token Create a new token in the generic scope. This type of token can be used for various use cases that do not involve sensitive card payment credentials. Endpoint: POST /api/generic/tokens Version: 1.0 Security: APIKey, AdminToken ## Request fields (application/json): - `expiration_time` (integer) The expiry time is used to specify after how many seconds a token should be automatically deleted after creation. - `payload` (object, required) The payload is a key-value map, that can contain any information the user wants to store in the token. * Maximum 20 key-value pairs. * Maximum 20 characters per key. * Maximum 80 characters per value. - `metadata` (object) Metadata consisting of entries, each of which each includes a key and an associated value: * Maximum 20 key-value pairs. * Maximum 20 characters per key. * Maximum 80 characters per value. Example: {"my_key_one":"my_value_one","my_key_two":"my_value_two"} - `type_id` (string) The ID of a type to apply for this payload. If provided the payload will be validated against the schema of the type and the tokens can be filtered by the type ID as well. ## Response 200 fields (application/json): - `id` (string, required) - `created_at` (string, required) - `expires_at` (string) - `metadata` (object) Metadata consisting of entries, each of which each includes a key and an associated value: * Maximum 20 key-value pairs. * Maximum 20 characters per key. * Maximum 80 characters per value. Example: {"my_key_one":"my_value_one","my_key_two":"my_value_two"} ## Response 401 fields (application/json): - `code` (integer) The corresponding HTTP status code for the error - `classifier` (string) Technical code that helps to identify the error - `message` (string) Human readable representation of the error ## Response 403 fields (application/json): - `code` (integer) The corresponding HTTP status code for the error - `classifier` (string) Technical code that helps to identify the error - `message` (string) Human readable representation of the error ## Response 409 fields (application/json): - `code` (integer) The corresponding HTTP status code for the error - `classifier` (string) Technical code that helps to identify the error - `message` (string) Human readable representation of the error ## Response 422 fields (application/json): - `code` (integer) The corresponding HTTP status code for the error - `classifier` (string) Technical code that helps to identify the error - `message` (string) Human readable representation of the error - `validation_errors` (array) - `validation_errors.path` (string) Json-path in the request which points to the validation error - `validation_errors.message` (string) Human readable validation message