Profiles

Create Profile

Create a profile to represent an end-user

Understanding Profiles

In postcore, profiles represent your end-users. If you're building a social media scheduler with 100 users, you'll have 100 profiles - one per user.

Each profile can connect to:

  • One LinkedIn account
  • One Bluesky account
  • (More platforms coming soon)

When to Create Profiles

You have two options:

Option 1: Create explicitly - Create the profile first, then connect platforms later. This gives you more control.

Option 2: Auto-create - Skip profile creation and let postcore create one automatically when you connect the first platform. Simpler for quick integrations.

Endpoint

POST /profiles/create

Request

curl -X POST https://api.postcore.dev/profiles/create \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileName": "User: john@example.com"
  }'
const response = await fetch('https://api.postcore.dev/profiles/create', {
  method: 'POST',
  headers: {
    'x-api-key': process.env.POSTCORE_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    profileName: 'User: john@example.com'
  }),
});

const { profileKey } = await response.json();
// Store this profileKey with your user's account in your database
import os
import requests

response = requests.post(
    'https://api.postcore.dev/profiles/create',
    headers={
        'x-api-key': os.getenv('POSTCORE_API_KEY'),
        'Content-Type': 'application/json'
    },
    json={'profileName': 'User: john@example.com'}
)

profile_key = response.json()['profileKey']
# Store profile_key with your user's account

Request Body

FieldTypeRequiredDescription
profileNamestringNoOptional descriptive name for the profile

Response

{
  "profileKey": "prof_abc123def456",
  "profileName": "User: john@example.com"
}

Status Code: 201 Created

Response Fields

FieldTypeDescription
profileKeystringUnique identifier for the profile
profileNamestringThe name you provided (or null)

Storing Profile Keys

The profileKey is essential - store it with your user's account:

// Example: Save to your database
await db.users.update({
  where: { id: userId },
  data: { postcoreProfileKey: profileKey },
});

You'll need this profileKey to:

  • Connect social media platforms
  • Schedule posts
  • List/manage the user's posts

Next Steps

After creating a profile, connect social media platforms:

Or skip profile creation and let it auto-create during platform connection.