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 catalogs = await client.providers.catalog.list();
console.log(catalogs.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
)
catalogs = client.providers.catalog.list()
print(catalogs.paging)package main
import (
"context"
"fmt"
"github.com/trycourier/courier-go/v4"
"github.com/trycourier/courier-go/v4/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
catalogs, err := client.Providers.Catalog.List(context.TODO(), courier.ProviderCatalogListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", catalogs.Paging)
}
package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.providers.catalog.CatalogListParams;
import com.courier.models.providers.catalog.CatalogListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
CatalogListResponse catalogs = client.providers().catalog().list();
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
catalogs = courier.providers.catalog.list
puts(catalogs)<?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 {
$catalogs = $client->providers->catalog->list(
channel: 'channel', keys: 'keys', name: 'name'
);
var_dump($catalogs);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using TryCourier;
using TryCourier.Models.Providers.Catalog;
CourierClient client = new();
CatalogListParams parameters = new();
var catalogs = await client.Providers.Catalog.List(parameters);
Console.WriteLine(catalogs);courier providers:catalog list \
--api-key 'My API Key'curl --request GET \
--url https://api.courier.com/providers/catalog \
--header 'Authorization: Bearer <token>'{
"paging": {
"cursor": "MTpFWUNFRkRRN0c1WERTRTU2",
"more": true
},
"results": [
{
"provider": "string",
"name": "Example Name",
"description": "An example description.",
"channel": "string",
"settings": {
"settings_key": {
"type": "string",
"required": true,
"values": [
"string"
]
}
}
}
]
}Providers
List available provider types
Returns the provider types Courier supports, each with a display name, description, and the configuration fields it requires.
GET
/
providers
/
catalog
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 catalogs = await client.providers.catalog.list();
console.log(catalogs.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
)
catalogs = client.providers.catalog.list()
print(catalogs.paging)package main
import (
"context"
"fmt"
"github.com/trycourier/courier-go/v4"
"github.com/trycourier/courier-go/v4/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
catalogs, err := client.Providers.Catalog.List(context.TODO(), courier.ProviderCatalogListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", catalogs.Paging)
}
package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.providers.catalog.CatalogListParams;
import com.courier.models.providers.catalog.CatalogListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
CatalogListResponse catalogs = client.providers().catalog().list();
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
catalogs = courier.providers.catalog.list
puts(catalogs)<?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 {
$catalogs = $client->providers->catalog->list(
channel: 'channel', keys: 'keys', name: 'name'
);
var_dump($catalogs);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using TryCourier;
using TryCourier.Models.Providers.Catalog;
CourierClient client = new();
CatalogListParams parameters = new();
var catalogs = await client.Providers.Catalog.List(parameters);
Console.WriteLine(catalogs);courier providers:catalog list \
--api-key 'My API Key'curl --request GET \
--url https://api.courier.com/providers/catalog \
--header 'Authorization: Bearer <token>'{
"paging": {
"cursor": "MTpFWUNFRkRRN0c1WERTRTU2",
"more": true
},
"results": [
{
"provider": "string",
"name": "Example Name",
"description": "An example description.",
"channel": "string",
"settings": {
"settings_key": {
"type": "string",
"required": true,
"values": [
"string"
]
}
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Comma-separated provider keys to filter by (e.g. sendgrid,twilio).
Case-insensitive substring match against the provider display name.
Exact match (case-insensitive) against the provider channel taxonomy (e.g. email, sms, push).
⌘I