Making a Request

Domain

Throughout this documentation, you’ll see references to api routes like /api/import/upload. The part of the URL not written is your SourceAudio site. For instance, to make that call on my testing site, I would call:

http://brentracks.sourceaudio.com/api/import/upload

This is also true for custom url users.

If you intend heavy use of the API system, please contact us so we can point you toward a distributed API system, but otherwise, you’ll be using the same resources that power your site.

Request Method

For simplicity, most requests in the documentation will be exampled as GET requests, but we don’t actually care how you send the data in. It can be sent as GET, POST, or a JSON.

Including Your Token

Make sure to include your API token in your request payload. That can be part of the GET or POST or JSON, but it needs to be provided in some way, under the value token.

Errors

Any API call that generates an error will have an error field in the response, describing what the error was. Since particularly the Import API can be used to complete multiple API actions at once, some might succeed while others fail, so it’s important to check the error field, rather than relying only on HTTP status codes.