Skip to main content
GET
/
v1
/
integration
/
{integrationId}
curl -X GET "https://api.hooked.ai/v1/integration/int_yt_abc123" \
  -H "x-api-key: your_api_key_here"
{
  "success": true,
  "data": {
    "id": "int_yt_abc123",
    "type": "youtube",
    "identifier": "UC1234567890",
    "account": {
      "id": "UC1234567890",
      "name": "My YouTube Channel",
      "username": "mychannel",
      "avatarUrl": "https://yt3.ggpht.com/..."
    },
    "health": {
      "status": "healthy",
      "tokenValid": true,
      "lastChecked": "2024-03-15T10:00:00.000Z"
    },
    "createdAt": "2024-01-15T08:30:00.000Z"
  }
}
Try it out! Use the API playground on the right to test the Get Integration Details endpoint directly.

Overview

Get detailed information about a specific connected social platform, including account details and connection health status. Use this to:
  • Verify if a connection is still valid before scheduling
  • Check if tokens have expired and need re-authentication
  • Get account details for display purposes
If the health status shows expired or error, the user needs to reconnect the account through the Hooked Dashboard.

Endpoint

GET /v1/integration/{integrationId}

Path Parameters

integrationId
string
required
The unique ID of the integration to retrieve

Headers

x-api-key
string
required
Your API key from API Settings

Response

success
boolean
Whether the request was successful
data
object

Request Example

curl -X GET "https://api.hooked.ai/v1/integration/int_yt_abc123" \
  -H "x-api-key: your_api_key_here"

Response Examples

{
  "success": true,
  "data": {
    "id": "int_yt_abc123",
    "type": "youtube",
    "identifier": "UC1234567890",
    "account": {
      "id": "UC1234567890",
      "name": "My YouTube Channel",
      "username": "mychannel",
      "avatarUrl": "https://yt3.ggpht.com/..."
    },
    "health": {
      "status": "healthy",
      "tokenValid": true,
      "lastChecked": "2024-03-15T10:00:00.000Z"
    },
    "createdAt": "2024-01-15T08:30:00.000Z"
  }
}

Health Status Values

StatusDescriptionAction Required
healthyConnection is working, token is validNone
expiredAccess token has expiredUser must reconnect in dashboard
errorConnection error or missing tokenUser must reconnect in dashboard

Checking Health Before Scheduling

It’s a good practice to check integration health before scheduling a video:
async function scheduleIfHealthy(videoId, integrationId, scheduledDateTime) {
  // Check health first
  const healthResponse = await fetch(
    `https://api.hooked.ai/v1/integration/${integrationId}`,
    { headers: { 'x-api-key': process.env.HOOKED_API_KEY } }
  );

  const { data: integration } = await healthResponse.json();

  if (integration.health.status !== 'healthy') {
    throw new Error(`Integration ${integration.type} needs reconnection`);
  }

  // Proceed with scheduling
  const scheduleResponse = await fetch(
    'https://api.hooked.ai/v1/schedule/create',
    {
      method: 'POST',
      headers: {
        'x-api-key': process.env.HOOKED_API_KEY,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ videoId, integrationId, scheduledDateTime })
    }
  );

  return await scheduleResponse.json();
}

Next Steps

Authorizations

x-api-key
string
header
required

Path Parameters

integrationId
string
required

Integration ID

Response

200 - application/json

Success

success
boolean
data
object