Custom User Presets

We offer the possibility to save a set of options for a certain target as a preset, so it can be easily used in later conversions. These presets are only visible for the user that saved them.

The following request creates a preset for a PNG conversion with the options color and rotate, and sets the name to "my preset".

POST /v2/presets HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "name": "my preset",
    "target": "png",
    "options": {
        "color": "1980",
        "rotate": 180
    }
}
curl -X POST \
  https://api.api2convert.com/v2/presets \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "name": "my preset",
        "target": "png",
        "options": {
            "color": "1980",
            "rotate": 180
        }
}'

To find out how to use your preset proceed to create a job with the options that we need to make use of your preset.

To get all information for one preset, send the following request:

GET /v2/presets/<preset id here> HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "name": "my new preset name"
}

To find out how to use your preset, proceed to create a job with the options that we need to make use of your preset.

To get all information for one preset, send the following request:

curl -X GET \
  https://api.api2convert.com/v2/presets/<you preset id here> \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "name": "my new preset name"
    }'

If you want to modify a preset e.g. to set other options or a different name, you can send a patch request for the preset id you want to modify.

PATCH /v2/presets/<preset id here> HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "name": "my new preset name"
}

If you want to modify a preset, e.g. to set other options or a different name, you can send a patch request for the preset id you want to modify.

curl -X PATCH \
  https://api.api2convert.com/v2/presets/<you preset id here> \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "name": "my new preset name"
    }'

To delete a preset, simply send a delete request for the preset id you want to delete.

DELTE /v2/presets/<preset id here> HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

To delete a preset, simply send a delete request for the preset id you want to delete.

curl -X DELTE \
  https://api.api2convert.com/v2/presets/<you preset id here> \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>'


results matching ""

    No results matching ""