{"method":"POST","path":"https://api.revcent.com/v2/key_values/{key}","summary":"Edit A Key Value","description":"Edit a specific system wide key value using the key. Only use this operation if explicitly told to edit a Key Value. Key Values are not related to metadata. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/EditKeyValue.md for an in-depth overview of this operation.","operationId":"EditKeyValue","parameters":[{"in":"path","name":"key","description":"The key you wish to edit.","required":true,"schema":{"description":"The key, which cannot be modified once created. The key can contain alphabetical characters or underscores only, with a minimum length of 2 and a maximum length of 100. Cannot start or end with an underscore.","type":"string","pattern":"^[a-zA-Z](?:_?[a-zA-Z]+)*$","minLength":2,"maxLength":100}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"description":{"description":"The key description.","type":"string","maxLength":255},"value":{"description":"The value for the key. Cannot exceed 5MB in size. If the key_type property equals 'pointer', the value property must be either the RevCent ID or name of the item corresponding to the pointer_type.","type":"string"},"key_type":{"description":"The key_type can be either 'string' or 'pointer', default is 'string'. If set to 'pointer', the pointer_type property must be set and the value property must successfully associate with an item corresponding to the pointer_type.","type":"string","enum":["string","pointer"]},"pointer_type":{"description":"If the key_type property equals 'pointer', you must specify the pointer_type, otherwise ignore. The pointer_type is item that the keys' value is pointing to. For example, if pointer_type is 'payment_profile', then value property must be either the name or ID of an existing payment profile in RevCent.","type":"string","enum":["payment_profile"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"key":{"description":"The key, which cannot be modified once created. The key can contain alphabetical characters or underscores only, with a minimum length of 2 and a maximum length of 100. Cannot start or end with an underscore.","type":"string","pattern":"^[a-zA-Z](?:_?[a-zA-Z]+)*$","minLength":2,"maxLength":100},"description":{"description":"The key description.","type":"string","maxLength":255},"value":{"description":"The value for the key. Cannot exceed 5MB in size. If the key_type property equals 'pointer', the value property must be either the RevCent ID or name of the item corresponding to the pointer_type.","type":"string"},"key_type":{"description":"The key_type can be either 'string' or 'pointer', default is 'string'. If set to 'pointer', the pointer_type property must be set and the value property must successfully associate with an item corresponding to the pointer_type.","type":"string","enum":["string","pointer"]},"pointer_type":{"description":"If the key_type property equals 'pointer', you must specify the pointer_type, otherwise ignore. The pointer_type is item that the keys' value is pointing to. For example, if pointer_type is 'payment_profile', then value property must be either the name or ID of an existing payment profile in RevCent.","type":"string","enum":["payment_profile"]},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}