companies

Upsert My Company

Create or replace the signed-in account's company page.

200 on both create and update rather than 201 on create, matching PUT /api/profile: the client treats this as one "save" action, and branching its success handler on a status code gains it nothing that exists in the body does not already say.

Idempotent in the sense that matters: the editable row is looked up by user_id with origin null/claimed, so saving twice updates that one page and never overwrites an imported directory listing the same account may also own.

The handle check happens twice, on purpose

Once here against BOTH tables (handle_owner) and once in the database against this table's unique index. The first is the only thing that can catch a collision with a PERSON -- no index spans the two tables, see api.handles -- and it produces a clear 409 before anything is written. The second closes the race the first cannot: between the check and the INSERT, another company can take the name, and only the index is authoritative about that.

published_at is set once and never cleared

Stamped the first time is_public goes true, left alone on every later save, and deliberately NOT cleared when a page is unpublished. It answers "how long have they been here", which is a trust signal that survives a company taking its page down for a fortnight; clearing it would make a returning company look brand new, and re-publishing would then quietly mint a fresh founding date for an account that has been here two years.

put/api/company

Request

  • Base URL: https://api.parlel.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.parlel.com/api/company
  • Auth: none declared

Headers

authorizationstring nullable

Request body

handlestring required
namestring required
taglinestring nullable
aboutstring nullable
locationstring nullable
size'1-10' | '11-50' | '51-200' | '201-500' | '501-1000' | '1001-5000' | '5000+' nullable
industrystring nullable
founded_yearinteger nullable
website_urlstring nullable

must be a http:// or https:// URL with a hostname and no credentials

linkedin_urlstring nullable

must be a http:// or https:// URL with a hostname and no credentials

x_urlstring nullable

must be a http:// or https:// URL with a hostname and no credentials

github_urlstring nullable

must be a http:// or https:// URL with a hostname and no credentials

careers_urlstring nullable

must be a http:// or https:// URL with a hostname and no credentials

contact_emailstring nullable
is_publicboolean

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.