Endpoints

Pitchly API reference

Ground rules

Since Pitchly uses GraphQL for its API, every request is routed to a single URL endpoint.

https://v2.pitchly.net/graphql

Since REST is backwards compatible with GraphQL, if you would rather use REST, you can do so by:

  • Sending all requests to the same URL above

  • Using the POST method for all requests

  • Setting the Content-Type header of the request to application/json

  • Putting the REST-equivalent JSON from each example in the Body of the request

Each example provided in this documentation reference will show both a GraphQL version of the request and an equivalent REST version. The result that follows the request will be the same for each.

Authorization

For every request, you will include the App Secret you made in the previous section in the Body of your request as the parameter secretKey. The following sections will demonstrate where to include your secretKey.

If you are creating Pitchly Apps for other companies using our App SDK, you would swap out the secretKey in each request for an accessToken.

Remember to keep your App Secret private, or bad things could happen!

Debugging tools

For our fellow developers, we've enabled GraphQL Playground on Pitchly so you can test and debug your API requests without writing any code.

https://v2.pitchly.net/graphql

Request types

At a high level, there are three types of requests you can make with Pitchly's API:

  • Queries (for pulling data from Pitchly)

  • Mutations (for pushing data to Pitchly)

  • Subscriptions (for listening to changes to data in Pitchly)