JavaScript
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const providers = await client.providers.list();
console.log(providers.paging);import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted
)
providers = client.providers.list()
print(providers.paging)package main
import (
"context"
"fmt"
"github.com/trycourier/courier-go"
"github.com/trycourier/courier-go/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
providers, err := client.Providers.List(context.TODO(), courier.ProviderListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", providers.Paging)
}package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.providers.ProviderListParams;
import com.courier.models.providers.ProviderListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
ProviderListResponse providers = client.providers().list();
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
providers = courier.providers.list
puts(providers)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Courier\Client;
use Courier\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API Key');
try {
$providers = $client->providers->list(cursor: 'cursor');
var_dump($providers);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using TryCourier;
using TryCourier.Models.Providers;
CourierClient client = new();
ProviderListParams parameters = new();
var providers = await client.Providers.List(parameters);
Console.WriteLine(providers);courier providers list \
--api-key 'My API Key'curl --request GET \
--url https://api.courier.com/providers \
--header 'Authorization: Bearer <token>'{
"paging": {
"cursor": "MTpFWUNFRkRRN0c1WERTRTU2",
"more": true
},
"results": [
{
"id": "pc_01kx4h2jdafq8bk9arsty8hr35",
"title": "Example Name",
"provider": "string",
"alias": "string",
"settings": {},
"created": 1,
"updated": 1
}
]
}Providers
List providers
List configured provider integrations for the current workspace. Supports cursor-based pagination.
GET
/
providers
JavaScript
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const providers = await client.providers.list();
console.log(providers.paging);import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted
)
providers = client.providers.list()
print(providers.paging)package main
import (
"context"
"fmt"
"github.com/trycourier/courier-go"
"github.com/trycourier/courier-go/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
providers, err := client.Providers.List(context.TODO(), courier.ProviderListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", providers.Paging)
}package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.providers.ProviderListParams;
import com.courier.models.providers.ProviderListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
ProviderListResponse providers = client.providers().list();
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
providers = courier.providers.list
puts(providers)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Courier\Client;
use Courier\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API Key');
try {
$providers = $client->providers->list(cursor: 'cursor');
var_dump($providers);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using TryCourier;
using TryCourier.Models.Providers;
CourierClient client = new();
ProviderListParams parameters = new();
var providers = await client.Providers.List(parameters);
Console.WriteLine(providers);courier providers list \
--api-key 'My API Key'curl --request GET \
--url https://api.courier.com/providers \
--header 'Authorization: Bearer <token>'{
"paging": {
"cursor": "MTpFWUNFRkRRN0c1WERTRTU2",
"more": true
},
"results": [
{
"id": "pc_01kx4h2jdafq8bk9arsty8hr35",
"title": "Example Name",
"provider": "string",
"alias": "string",
"settings": {},
"created": 1,
"updated": 1
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Opaque cursor for fetching the next page.
⌘I