> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ycpedia.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an article

> Refreshes an existing profile with a new research run for 100 credits. Requires an existing profile. Returns 202 while queued or running; a replay of a terminal job returns 200. Poll the job for the included result. Failed or cancelled jobs are refunded.



## OpenAPI

````yaml POST /api/v1/articles/{linkedin_id}/update
openapi: 3.1.0
info:
  title: YCpedia API
  version: 1.0.0
  description: >-
    Read, generate, and update profile articles by LinkedIn ID. Obtain your API
    key and API base URL from the YCpedia team.
servers:
  - url: https://api.thealmanac.ai
    description: Production API
security:
  - CustomerApiKey: []
paths:
  /api/v1/articles/{linkedin_id}/update:
    post:
      summary: Update an article
      description: >-
        Refreshes an existing profile with a new research run for 100 credits.
        Requires an existing profile. Returns 202 while queued or running; a
        replay of a terminal job returns 200. Poll the job for the included
        result. Failed or cancelled jobs are refunded.
      operationId: update_an_article
      parameters:
        - name: linkedin_id
          in: path
          required: true
          description: The slug after linkedin.com/in/, for example jane-doe.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            A unique value for this operation. Reuse it when retrying the same
            request to avoid duplicate charges.
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiJobResponse'
        '202':
          description: Generation queued or running. Poll the returned job_id for free.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiJobResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
        '402':
          description: Insufficient credits. Buy credits before retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
        '404':
          description: Profile or job not found, unavailable, or inaccessible.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
        '409':
          description: >-
            Another job is active for this profile, or the idempotency key was
            used for a different operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
        '422':
          description: Invalid request or missing Idempotency-Key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
        '429':
          description: Rate limit exceeded. Wait for the Retry-After duration.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          additionalProperties: true
                          type: object
                required:
                  - detail
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                example: 60
      security:
        - CustomerApiKey: []
components:
  schemas:
    ApiJobResponse:
      properties:
        job_id:
          format: uuid
          title: Job Id
          type: string
        linkedin_id:
          title: Linkedin Id
          type: string
          examples:
            - jane-doe
        status:
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
          title: Status
          type: string
        credits_charged:
          title: Credits Charged
          type: integer
          description: >-
            Credits reserved or charged for this operation. Returns 0 after a
            failed or cancelled job is refunded.
          examples:
            - 100
        article:
          anyOf:
            - $ref: '#/components/schemas/ApiArticle'
            - type: 'null'
          default: null
        error:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Error
      required:
        - job_id
        - linkedin_id
        - status
        - credits_charged
      title: ApiJobResponse
      type: object
    ApiArticle:
      properties:
        article_id:
          title: Article Id
          type: string
        title:
          title: Title
          type: string
        content:
          title: Content
          type: string
          description: Article text with its original formatting and citation references.
        sources:
          items:
            $ref: '#/components/schemas/ApiSource'
          title: Sources
          type: array
        infobox:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Infobox
          description: Available profile metadata. Keys vary by article; may be null.
        current_version:
          title: Current Version
          type: integer
          examples:
            - 1
        created_at:
          format: date-time
          title: Created At
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - article_id
        - title
        - content
        - sources
        - infobox
        - current_version
        - created_at
        - updated_at
      title: ApiArticle
      type: object
    ApiSource:
      properties:
        id:
          title: Id
          type: integer
        title:
          title: Title
          type: string
        url:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Url
        publication:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Publication
        excerpt:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Excerpt
      required:
        - id
        - title
      title: ApiSource
      type: object
  securitySchemes:
    CustomerApiKey:
      type: http
      scheme: bearer
      description: Your customer API key (alm_…). Keep it on your server.

````