How do i create a custom field using the Trello API?

I want to create custom fields using the Trello API.
On Trello REST API and Getting Started With Custom Fields are no informations about the api-key and -token at the corresponding sections.
How can i create custom fields on my boards without declaring my api-key and -token?
Where do i have to declare my api-key and -token?

The only way you can do this is by using a Trello client (web/mobile). There is not a way to do this via the API without a key/token.

Generally, you want to add the API key and token as query parameters on the call. For instance, a GET request may look like this:


Thank you for your answer! I just figured it out.
I copied the request body out of the documentation and didn’t recognize the missing quotation marks. I tried it by adding the key and token to the body just like in the custom fields value set, update and remove request.
It worked!

So my Request looks like:
“idModel”: “”,
“modelType”: “board”,
“name”: “priority”,
“pos”: “bottom”,
“type”: “text”,
“display_cardFront”: true,
“key”: “”,
“token”: “”